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

st: Re: 2sls by hand


From   Christopher F Baum <[email protected]>
To   [email protected]
Subject   st: Re: 2sls by hand
Date   Fri, 13 Dec 2002 06:18:41 -0500

--On Friday, December 13, 2002 2:33 -0500 Lee wrote:

Hi, Listers

     I am puzzled that the IVREG and 2sls give out the following different
results:
They do not; you're getting essentially the same beta-hats in each case (you should do 'predict double' to increase accuracy) and that is all that you can expect from doing 2SLS 'by hand'. As any textbook indicates, doing 2SLS 'by hand' will give you the wrong s^2, var-cov matrix, residuals, and summary statistics, since the residuals you want from the second stage are
(y - X betahat) whereas those mindlessly computed by -regress- are (y - Z betahat). Likewise, the var-cov for 2SLS will involve both X and Z, whereas what you have from -regress- is s^2 (Z'Z)inv, with the wrong s^2. If you went to the trouble of calculating the correct statistics 'by hand' after the manual second stage -regress-, you would reproduce -ivreg- perfectly.

You _have_ dealt properly with one issue that plagues many users of -ivreg-: the fact that the first stage regression should include _all_ of the instruments, not merely the excluded instrument. People routinely write and ask how to prevent Stata from using all of the included exogeneous regressors as instruments in ivreg, which indicates a fundamental misunderstanding of the instrumental variables estimator.

Kit
*
* 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