Announcement

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

  • Horizontal bar chart, categorized by gender, multiple variables in the same graph

    Hi Statalist users, I would like to draw a horizontal bar chart that shows the mean of a variable, categorized by gender, and have multiple variables in the same graph. Can someone help me with that? Attached is the graph that I want to produce. Thank you!
    Click image for larger version

Name:	image_28963.png
Views:	1
Size:	63.8 KB
ID:	1686777

    Code:
    input gender q1 q2
    2 0 0
    1 0 0
    1 0 1
    2 0 0
    1 0 0
    2 0 0
    2 0 0
    1 0 0
    1 0 0
    1 0 0
    2 0 0
    1 0 0
    1 0 0
    1 0 0
    1 0 1
    1 0 1
    1 0 0
    2 1 0
    2 1 1
    1 0 0
    1 0 0
    1 0 0
    1 0 1
    1 0 0
    2 1 1
    1 1 1
    1 1 1
    1 1 1
    1 0 1
    1 1 1
    1 1 1
    2 1 1
    1 0 0
    1 0 0
    1 0 1
    1 0 0
    1 1 1
    2 1 1
    2 1 1
    1 0 0
    1 0 0
    1 0 0
    1 0 0
    1 0 0
    1 0 0
    2 0 0
    1 1 0
    1 0 1
    1 0 0
    2 1 1
    end
Working...
X