Announcement

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

  • Bar Graph showing mean of continuous variable

    Hi, I am very new to Stata and am having great difficulty plotting a particular bar graph. I am wanting to show the mean years of education (edu) between children living with a pension recipient and those not (captured by binary OAP). Furthermore I want to show these differences by gender (gender) within these 2 groups, while limiting the sample to those between 0-18 years of age (age). Like I said I am very new to Stata and would appreciate any assistance.

  • #2
    You can use an if expression to limit the data is age <= 18 and multiple over() statements within a -graph bar- For example:

    Code:
    sysuse nlsw88, clear
    graph bar (mean) wage if wage< 20, over(smsa) over(married) over(collgrad)

    Comment


    • #3
      Thank you Scott, this was very helpful

      Comment

      Working...
      X