I have a very specific question about Stata's marginplot command: I am currently running this regression:
gen x1_x2 = x1*x2 gen z_x2 = z*x2 xtivreg y (x1 x1_x2 = z z_x2) x2, fe margins, dydx(x1) at(x2=(-2.5(0.5)2.5)) Where x1 is an endogenous regressor instrumented by z. All regressors are continous. Note that I cannot use the normal stata interaction c.x1##c.x2 as this does not work with xtivreg and margins (then it says "not estimable"). So I coded the interaction manually which works fine for the regression. However, the margins result is now constant for all levels of x2 (which is clearly not the case, the interacion has a strong coefficient in the regression.
I am happy to share the results but it seems hard to paste stata results here for some reasons. Any ideas would be much appreciated!
gen x1_x2 = x1*x2 gen z_x2 = z*x2 xtivreg y (x1 x1_x2 = z z_x2) x2, fe margins, dydx(x1) at(x2=(-2.5(0.5)2.5)) Where x1 is an endogenous regressor instrumented by z. All regressors are continous. Note that I cannot use the normal stata interaction c.x1##c.x2 as this does not work with xtivreg and margins (then it says "not estimable"). So I coded the interaction manually which works fine for the regression. However, the margins result is now constant for all levels of x2 (which is clearly not the case, the interacion has a strong coefficient in the regression.
I am happy to share the results but it seems hard to paste stata results here for some reasons. Any ideas would be much appreciated!
Comment