this is my first time posting on StataList so I hope Im not in breach of most rules and requirements.
My problem is the following:
I am running a logistic regression with a continuous by continuous interaction term, however, I get very different results for my predicted probabilities of the interaction term when using A) the margins command which defines different levels for each variable versus B) the dydx command, which, if I understand correctly, is simply meant to provide me with the average of the marginal effects observed in the marginsplot obtained from A.
While using the code in Option A provides me with relatively realistic predicted probabilities (ranging from 0 to 0.4), the code in Option B deviates starkly from these results (ranging from 0.01 to 0.03), which seems odd given the strongly positive and significant effect these variables have in my prior analysis without the interaction term.
The interaction term of interest is the effect of c.Dissatisfaction_Democracy on the Populist right-wing vote (binary) at different levels of c.Limit_Refugees. (c.Dissatisfaction_Democracy##c.Limit_Refugees).
- Dissatisfaction_Democracy has a scale of 1-10
- Limit_Refugees has a scale of 1-5
Option A:
logistic dep c.Dissatisfaction_Democracy##c.Limit_Refugees i.Age_Cat i.Sex ib1.Education i.Income i.employment_status Personal_economicposition i.East LeftRight [pweight=w_ipfges]
margins, at (Dissatisfaction_Democracy=(1(1)10) Limit_Refugees=(1(1)5)) vsquish
marginsplot, name(A1, replace)
Option B:
logistic dep c.Dissatisfaction_Democracy##c.Limit_Refugees i.Age_Cat i.Sex ib1.Education i.Income i.employment_status Personal_economicposition i.East LeftRight [pweight=w_ipfges]
margins, dydx(Dissatisfaction_Democracy) at(Limit_Refugees=(1(1)5)) vsquish post saving(file1, replace)
marginsplot, yline(0) name(A1, replace)
Is this stark difference in predicted probabilities a natural outcome of these operations? Or is there something wrong with my code?
Very grateful for your insight!
Gesine
0 Response to Very different Results for Marginal effects vs. average marginal effects (continuous interaction)
Post a Comment