Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: re: How to correct standard errors of a 2sls performed by hand ?


From   John Antonakis <[email protected]>
To   [email protected]
Subject   Re: st: re: How to correct standard errors of a 2sls performed by hand ?
Date   Fri, 05 Feb 2010 23:17:27 +0100

Hi:

How would one deal with systems of equations (i.e., reg3) and concurrently have heteroskedastic-robust standard errors? Would bootstrapping with reg3 just be the simplest solution?

Regards,
John.

____________________________________________________

Prof. John Antonakis, Associate Dean
Faculty of Business and Economics
Department of Organizational Behavior
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny
Switzerland

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

Faculty page:
http://www.hec.unil.ch/people/jantonakis

Personal page:
http://www.hec.unil.ch/jantonakis
____________________________________________________



On 05.02.2010 23:11, Kit Baum wrote:
> <>
> No need to do any bootstrapping if it is just linear regression:
>
> // how to fix 2SLS estimates done 'by hand'
> sysuse auto, clear
> ivreg2 price (weight = turn foreign) headroom, small
> estat vce
> di e(rmse)
> mat v2sls = e(V)
> // First stage reg
> qui reg weight turn foreign headroom
> predict double what, xb
> // Second stage reg
> qui reg price what headroom
> scalar rmsebyhand = e(rmse)
> // the 'wrong' VCE, calculated from the instruments
> mat vbyhand = e(V)
> scalar dfk = e(df_r)
> // the correct resids: orig regressors * second stage coeffs
> g double eps2 = (price - _b[what]*weight - _b[headroom]*headroom - _b[_cons])^2
> qui su eps2
> // corrected RMSE, based on the correct resids
> scalar rmsecorr = sqrt(r(sum) / dfk)
> // corrected VCE, using the right s^2
> mat vcorr = (rmsecorr / rmsebyhand)^2 * vbyhand
> mat li vcorr
> // check to see that it equals the real 2SLS VCE
> mat diff = v2sls - vcorr
> mat li diff
>
>
> Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html > An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html > An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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