I am running a two-stage least squares (2SLS) regression in Stata (panel data). I have one exogenous variable (x1), one endogenous variable (x2), and one instrument for x2 (z).
I interested in the effect of x2 on y, and in particular in the effect of the interaction x1*x2 on y.
What I wrote is:
xtivreg2 2sls y x1 (x2 c.x2#i.x1 = z i.z#i.x1), fe
I always get error message "operator invalid" for c.x2#i.x1.
Could anyone help here?