I am trying to run a 2SLS regression in Stata 13, but am struggling to find the right way to code an interaction between the endogenous variable and a categorical variable of interest. I have been searching the forum, but can't find many similar threads. What I am looking to do is something like this:
I did find this post that suggests the best strategy is to instrument the interaction itself. So, instead this would look like:
But I am interested in looking at the effect of Y2 on Y1 at different levels of X1, and I don't see how I could get these estimates by interacting X1 with Y2. The three categories of X1 are meaningful for interpretation, so I would ideally like to use Z1 as an instrument for Y2 before interacting this estimator with X1.
Any suggestions on how I can do this?
Code:
ivregress 2sls Y1 (Y2 = Z1)##i.X1 X2 X3
Code:
ivregress 2sls Y1 (Y2*X1 = Z1) X2 X3
Any suggestions on how I can do this?
Comment