I have a model involving instrumental variables that I wish to estimate using random effects on an unbalanced panel, whilst applying analytical weights in Stata. Xtivreg does not allow for use of analytical weights and I have tried a number of approaches without success. Suggestions welcome!
1. Pre-weight data and run xtivreg (weighting along the lines of http://www.stata.com/support/faqs/st...ar-regression/). Because this requires creating a variable for the constant term, it is necessary to then suppress the default constant term, but this is not possible within xtivreg or xtreg, re.
2. Expand the dataset. This seems to work well for point estimates but not for standard errors and I would like to obtain the 'correct' SEs.
3. I think it should be possible to transform the data (GLS) to reproduce the results of random effects IV models using ivreg2, which is then compatible with analytical weights. Using GLS I have only managed to successfully replicate xtreg, re with a balanced panel, and have not been able to replicate xtivreg with a balanced or unbalanced panel.
Many thanks,
James
1. Pre-weight data and run xtivreg (weighting along the lines of http://www.stata.com/support/faqs/st...ar-regression/). Because this requires creating a variable for the constant term, it is necessary to then suppress the default constant term, but this is not possible within xtivreg or xtreg, re.
2. Expand the dataset. This seems to work well for point estimates but not for standard errors and I would like to obtain the 'correct' SEs.
3. I think it should be possible to transform the data (GLS) to reproduce the results of random effects IV models using ivreg2, which is then compatible with analytical weights. Using GLS I have only managed to successfully replicate xtreg, re with a balanced panel, and have not been able to replicate xtivreg with a balanced or unbalanced panel.
Many thanks,
James
Comment