Announcement

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

  • Graphing adjusted odds ratio (multiple line graph)

    Can someone please share with me of the STATA command that I can use 1) to predict adjusted odds ratios for obesity (y axis) and age (x axis) by socioeconomic status? 2) what would be the command if I want to adjust for other variables such as smoking or marital status?

  • #2
    I assume you want the odds of obesity (expected number of obese persons for every non-obese person) and not the odds ratio ( the odds of being obese for one group divided by the odds of being obese for another group).

    Code:
    sysuse nlsw88
    logit union grade i.south i.race
    margins, expression(exp(xb())) over(grade) at(south=0 race=1)
    marginsplot, ytitle(odds of union membership)
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	29.8 KB
ID:	1532229
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thanks a lot, it was really helpful.

      Comment

      Working...
      X