Dear Statalist,
I want to run a two-stage least squares regression as follow: X2 is the endogenous variable and Z is the instrument variable for X2
Y = a + b1*(X1*X2) + b2*X2 + b3*X3 + b4*X4 + e
Here is my trial code for your review:
May I ask that is the above codes correct? This is cos that I found some variables' t-statistics are very large and not reasonable in comparing to its coefficient size.
Moreover, if I use -ivreg2-:
It shows the error message of not enough space to run the command. As -ivreg2- should generate the same result as -ivregress-, so do you possibly know how to fix it?
Many thanks for your help in advance!
I want to run a two-stage least squares regression as follow: X2 is the endogenous variable and Z is the instrument variable for X2
Y = a + b1*(X1*X2) + b2*X2 + b3*X3 + b4*X4 + e
Here is my trial code for your review:
Code:
gen XX = X1 * X2 gen XZ = X1 * Z ivregress 2sls Y X3 X4 (X2 XX = Z XZ ) i.ind i.year, vce(cluster gvkey) first small
Moreover, if I use -ivreg2-:
Code:
ivreg2 Y X3 X4 (X2 XX = Z XZ) i.ind i.year, first savefirst savefprefix(st1)
Many thanks for your help in advance!

Comment