Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: correct std errors for 2sls in hetero. panels


From   Joe Balagtas <[email protected]>
To   [email protected]
Subject   st: correct std errors for 2sls in hetero. panels
Date   Thu, 29 Jan 2004 16:19:29 -0800

Stata users:
I want to estimate a cross-section time-series model with endogeneous
regressors and heteroscedastic errors.  xtivreg would allow me to do 2sls,
and xtgls would allow heteroscedasticity across panels, serial correlation
within panels, and contemporaneous correlation across panels.  Is there a
simple way to do both 2sls and GLS?

I've tried to do it the long way: estimate the first stage regressions,
save the predictions, estimate the 2nd stage regressions using the
predictions from the first stage as regressors.  E.g.,

xtgls x1 z1 z2 x3, panels(hetero) corr(psar1)
predict x1hat
xtgls x2 z1 z2 x3, panels(hetero) corr(psar1)
predict x2hat
xtgls y x1hat x2hat x3, panels(hetero) corr(psar1)

(where x1 and x2 are assumed endogenous, and x3 exogenous)

I've got two questions regarding this approach.
1) Am I using the correct residuals to estimate the variance matrix and
thus transform the model?  The way it's set up, I'm estimating the variance
matrix with the residuals from OLS on the 2nd stage regression.  But should
I be using the residuals based on X instead of Xhat?  Or does it matter?

2) How can I get the correct standard errors?

Any guidance is appreciated.


Joe Balagtas
Agricultural and Resource Economics
University of California, Davis
phone 530-752-2069
email [email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index