Announcement

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

  • How to produce a predicted graph between dependent and independent variables, keeping all other variables constant?

    How to produce a predicted graph between a dependent and an independent variable (both continuous variables), keeping all the other control variables constant at means?

  • #2
    Code:
    regress y x z1 z2 z3 // etc.
    summ x, meanonly
    local xlist (`r(min)' `r(max)')
    margins, at(x = `xlist') atmeans
    marginsplot

    Comment


    • #3
      Thank you so much. I thought margins command will work. Thanks for the full code. It really helps.

      Comment

      Working...
      X