Announcement

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

  • Margins for maximum value of independent variable.

    I am currently working on a multilevel model, which shows the relationship between education and prejudice, interacted by regimescore.

    mixed socialdistance c.Education##c.regimescore unemployment GDP Migration5y GINI ||Nations:, covariance(independent) reml

    Now i want to show the marginal effects of education on prejudice at different levels of regimescore, and report the marginal effects graphically.

    However, i get that when you make the margins command, it only computes the effects of an increase in the independent variable, from 0 to 1 across different levels of the moderator. What i want to do is show the marginals effects of going from 0 to the maximum value on my independent variabel (Education).
    Is that possible? So far i have used:

    margins, dydx(Eduref) at(DemSc=(1/7)) vsquish
    marginsplot

  • #2
    The easiest solution is just create a new variable in which a unit increase corresponds to the entire range:

    Code:
    sum Education, meanonly
    gen ed =( Education - r(min)) / (r(max) - r(min))
    Personally, I would not treat education as continuous, but that is a substantive question and not a statistical question.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      The reason I treat education as a continous variable in this instance, is only because i want to show my findings graphically, with marginal effects in order to make the finding easier to interpret.

      Comment

      Working...
      X