Hi,
I’m using multilevel model exploring the impact of community factors on individual health (Y), thus using xtmixed and xtmelogit command in STATA. However two independent variables (X1, X2 ) are endogenous, and I have found two instrument variables (Z1, Z2) respectively.
My question is how to include instrumental variable analysis in multilevel model. Is there a command similar to ivreg in multilevel model in STATA?
And I have tried to do 2SLS manually in two steps, using instrumental variables (Z1, Z2) and exogenous variables to get the predict value of endogenous variables, and then using the fitted values to replace the endogenous variables. But the problem by doing so is that the standard errors for the coefficients in the second step is not valid. So what should I do with this?
And in 2SLS, OLS are used in both two steps. however, MLE is used in xtmixed and xtmelogit, so in the manually done tow steps MLE is used rather than OLS. So I am wondering would cause any problem?
Any help would be appreciated.
I’m using multilevel model exploring the impact of community factors on individual health (Y), thus using xtmixed and xtmelogit command in STATA. However two independent variables (X1, X2 ) are endogenous, and I have found two instrument variables (Z1, Z2) respectively.
My question is how to include instrumental variable analysis in multilevel model. Is there a command similar to ivreg in multilevel model in STATA?
And I have tried to do 2SLS manually in two steps, using instrumental variables (Z1, Z2) and exogenous variables to get the predict value of endogenous variables, and then using the fitted values to replace the endogenous variables. But the problem by doing so is that the standard errors for the coefficients in the second step is not valid. So what should I do with this?
And in 2SLS, OLS are used in both two steps. however, MLE is used in xtmixed and xtmelogit, so in the manually done tow steps MLE is used rather than OLS. So I am wondering would cause any problem?
Any help would be appreciated.
Comment