Announcement

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

  • Barchart by group with confidence intervals

    Hi everyone,

    I am plotting mean of a variable over two different variables with weight using the following code:

    Code:
    graph hbar (mean) earnings [pweight = wgt], over(sex) over(ethnicity)
    How can I add the confidence intervals here?

    Many thanks
    Reza

  • #2
    You can't. You need to switch to twoway bar. "Dynamite plot" is an otherwise unpredictable search term for many versions of this question.

    https://www.statalist.org/forums/for...s-in-bar-graph

    is an example. That said, your use of pweights takes me beyond my expertise, so I will not suggest specific code.

    Comment

    Working...
    X