Statalist


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

st: RE: RE: re: overidentification test and endogeneity test with -ivreg2-


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: re: overidentification test and endogeneity test with -ivreg2-
Date   Tue, 3 Nov 2009 08:26:58 -0000

Kelvin,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Kelvin Tan
> Sent: 03 November 2009 02:20
> To: [email protected]
> Subject: st: RE: re: overidentification test and endogeneity 
> test with -ivreg2-
> 
> Thanks Kit for your helpful insight about the endog test.  
> 
> One more question, 
> 
> Kit said: "You get different results for the overid test and 
> endog test in (2) because you're using a different VCE. If 
> you use the same VCE they agree exactly."
> 
> I am sorry for the typo. I meant to have clustered standard 
> errors "cl(idcode)" in both -ivregress- and -ivreg2- command 
> lines. I get different results for the overid test and endog 
> test when I used clustered standard errors in both 
> -ivregress- and -ivreg2-.

Kit and I are looking at this now.  We've worked out what's going on
with the overid test.  Curiously, -estat- after -ivregress- seems to
report a standard (heteroskedasticity)-robust overid test even when the
equation is estimated as cluster-robust.  Compare the following:

************************************************************
webuse nlswork, clear
qui ivregress 2sls wks_ue ( tenure = hours c_city  union)  grade, robust
estat overid
qui ivregress 2sls wks_ue ( tenure = hours c_city  union)  grade, robust
cl(idcode)
estat overid
qui ivreg2  wks_ue ( tenure = hours c_city  union)  grade, robust
di e(j)
qui ivreg2  wks_ue ( tenure = hours c_city  union)  grade, robust
cl(idcode)
di e(j)
************************************************************

You'll see that after -ivregress,robust-, -estat- reports the same
overid stat whether or not cluster(idcode) is also specified (I checked
Stata 10.1 and Stata 11.0).  This is the same overid stat that -ivreg2-
reports with robust.  -ivreg2-, however, reports a cluster-robust overid
stat that is (naturally) different from the
robust-but-not-cluster-robust stat.

Still looking at the endog option.

--Mark

> 
> **************************************************************
> **********
> *************
> webuse nlswork, clear
> ivregress 2sls wks_ue ( tenure = hours c_city  union)  grade, 
> cl(idcode) estat overid estat endog
> ivreg2  wks_ue ( tenure = hours c_city  union)  grade, endog(tenure)
> cl(idcode)
> **************************************************************
> **********
> **************
> 
> ***************************************************************
> Results from -ivregress-
> . estat overid
>   Test of overidentifying restrictions:
>   Score chi2(2)          =  4.32413  (p = 0.1151)
> 
> . estat endog
>   Tests of endogeneity
>   Ho: variables are exogenous
>   Robust regression F(1,4007)     =  .195661  (p = 0.6583)
>     (Adjusted for 4008 clusters in idcode)
> ****************************************************************
> 
> **************************************************************
> **********
> *****
> Results from -ivreg2-
> --------------------------------------------------------------
> ----------
> ------
> Hansen J statistic (overidentification test of all instruments):
> 3.519
>                                                    Chi-sq(2) P-val =
> 0.1722
> -endog- option:
> Endogeneity test of endogenous regressors:
> 0.567
>                                                    Chi-sq(1) P-val =
> 0.4513
> Regressors tested:    tenure
> --------------------------------------------------------------
> ----------
> ------
> **************************************************************
> **********
> ******
> 
> Thanks
> 
> Regards,
> Kelvin
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Kit Baum
> Sent: Tuesday, 3 November 2009 11:58 AM
> To: [email protected]
> Subject: st: re: overidentification test and endogeneity test with
> -ivreg2-
> 
> <>
> 
> You get different results for the overid test and endog test 
> in (2) because you're using a different VCE. If you use the 
> same VCE they agree exactly.
> 
> webuse nlswork, clear
> ivregress 2sls wks_ue ( tenure = hours c_city  union)  grade 
> estat overid estat endog
> ivreg2  wks_ue ( tenure = hours c_city  union)  grade, endog(tenure)
> 
> Re (1), ivreg2 without the gmm2s option (that is, 2SLS) bases 
> its overid test on the Hansen J statistic from the two-step 
> GMM VCE. The endog test is the difference between two Hansen 
> J statistics. Thus it does not matter, for the overid test 
> and the endog test, whether you estimate the equation with 
> 2SLS or GMM. The coefficient vector and its VCE change, of 
> course, but the tests are based on the optimal two-step VCE 
> in either case.
> 
> 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/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


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