Usually, we plot the marginal effect using the code below:
reg y c.x##c.x
margins, at x=(low (.1) high)
marginsplot
However, my supervisor said the interaction of x should be centered to mitigate the multicolinear issue. then the code becomes:
center x, pre(c_)
gen square_x=c_x*c_x
reg y x square_x#square_x
Undert this circumstance, how to plot the marginal effect?
Thanks all!
reg y c.x##c.x
margins, at x=(low (.1) high)
marginsplot
However, my supervisor said the interaction of x should be centered to mitigate the multicolinear issue. then the code becomes:
center x, pre(c_)
gen square_x=c_x*c_x
reg y x square_x#square_x
Undert this circumstance, how to plot the marginal effect?
Thanks all!
Comment