Hi all--I am trying to use marginsplot to graph my interactions. I have got it to work successfully when I only have a linear interaction term, but I cannot figure out a way to use marginsplot to graph interactions once I include a squared term. Does anyone have advice?
Only a linear interaction term:
Regression with squared interaction term:
Only a linear interaction term:
Code:
eststo: areg `var' prop_same_gender c.prop_same_race##i.race_3_s margins race_3_s, dydx(prop_same_race) quietly margins race_3_s, at(prop_same_race=(0(.1)1)) marginsplot, noci recast(line) ytitle("") title("`title'") legend(size(vsmall))
Code:
eststo: areg `var' prop_same_gender c.prop_same_race##i.race_3_s c.prop_same_race_sq##i.race_3_s
Comment