Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bar graph with frames

    Hello all,

    I am using Stata17. I have created frames with 100 numbers stored from regressions I did earlier. Now I need to present it as a bar chart. Namely, I have the following:

    Code:
     frame results: ci means results
    
        Variable |        Obs        Mean    Std. err.       [95% conf. interval]
    -------------+---------------------------------------------------------------
         results |        100    .0087491    .0079085       -.0069431    .0244414
    I would like to have a bar chart with a bar reaching the mean in the table, and moustache indicating a 95% confidence interval if that is possible.

    I did not quite understand how creating a graph works with frames. I would appreciate any help!

    Thanks,
    Farogat.

  • #2
    You just want to show the mean and its confidence interval?

    First:

    Code:
    ssc install coefplot, replace

    Code:
    frame change results
    ci means results
    mat m= [r(mean), r(lb), r(ub)]'
    coefplot mat(m), ci((2 3)) recast(bar) scheme(s1mono)
    frame change default

    Comment

    Working...
    X