Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: First-stage F from -xtivreg- versus AP F
From
David Torres <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: First-stage F from -xtivreg- versus AP F
Date
Tue, 21 Jan 2014 09:28:56 -0500
Statalisters,
I'm using -xtivreg- to estimate a 2SLS random effects model in Stata 13.0. I'm needing help getting the first stage F statistic in addition to the Angrist-Pischke F I can get from the postestimation command -xtoverid- (more on this below).
. which xtivreg
/Applications/Stata/ado/base/x/xtivreg.ado
*! version 1.6.2 14apr2011
. which xtoverid
/Users/diego/Library/Application Support/Stata/ado/plus/x/xtoverid.ado
*! xtoverid version 2.1.6 2Nov2011
*! Authors Mark Schaffer and Steve Stillman
*! Derived from overidxt and overid
Here is the most basic conditional model in which I am regressing vertically scaled reading scores on year and year-squared. The endogenous regressor, diffsch, denotes whether a student attended an out-of-zone magnet school. It is instrumented with the log difference in distance between the zoned school and the nearest magnet school and the log distance to the enrolled school:
. xtivreg srsc year yearsq (diffsch=diffdist dist_enrld), re first
First-stage G2SLS regression
Number of obs = 27830
Wald chi(4) = 7182
Prob> chi2 = 0.0000
------------------------------------------------------------------------------
diffsch | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
year | .0010897 .0023365 0.47 0.641 -.0034898 .0056692
yearsq | .0009441 .0005764 1.64 0.101 -.0001858 .0020739
diffdist | .004433 .001686 2.63 0.009 .0011284 .0077376
dist_enrld | .162999 .0019443 83.84 0.000 .1591883 .1668097
_cons | .1364031 .0035329 38.61 0.000 .1294787 .1433274
------------------------------------------------------------------------------
G2SLS random-effects IV regression Number of obs = 27830
Group variable: short_id Number of groups = 6168
R-sq: within = 0.8770 Obs per group: min = 3
between = 0.2215 avg = 4.5
overall = 0.6533 max = 5
Wald chi2(3) = 154192.94
corr(u_i, X) = 0 (assumed) Prob> chi2 = 0.0000
------------------------------------------------------------------------------
srsc | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
diffsch | 9.999284 1.941415 5.15 0.000 6.19418 13.80439
year | 74.19692 .3811099 194.69 0.000 73.44996 74.94389
yearsq | -7.926549 .0940278 -84.30 0.000 -8.11084 -7.742258
_cons | 475.1334 .6555358 724.80 0.000 473.8486 476.4182
-------------+----------------------------------------------------------------
sigma_u | 37.264026
sigma_e | 25.567877
rho | .67991546 (fraction of variance due to u_i)
------------------------------------------------------------------------------
Instrumented: diffsch
Instruments: year yearsq diffdist dist_enrld
------------------------------------------------------------------------------
Now I would like to get the first stage F-statistic, but the first option above does not appear to give it. If I use the postestimation command -xtoverid- with the noisily option, as shown below, I do get the Angrist-Pischke F, but in my write-up I'd like to show the regular F-stat to test joint significance of the instruments.
. xtoverid, nois
First-stage regressions
-----------------------
First-stage regression of __00000I:
OLS estimation
--------------
Estimates efficient for homoskedasticity only
Statistics consistent for homoskedasticity only
Number of obs = 27830
F( 5, 27825) = 2097.56
Prob> F = 0.0000
Total (centered) SS = 875.5555503 Centered R2 = 0.2037
Total (uncentered) SS = 960.0415225 Uncentered R2 = 0.2737
Residual SS = 697.2383726 Root MSE = .1583
------------------------------------------------------------------------------
__00000I | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
__00000R | .0010897 .0023365 0.47 0.641 -.00349 .0056694
__00000U | .0009441 .0005764 1.64 0.101 -.0001858 .0020739
__00000E | .1364031 .0035329 38.61 0.000 .1294784 .1433277
__00000L | .004433 .001686 2.63 0.009 .0011283 .0077377
__00000O | .162999 .0019443 83.84 0.000 .1591881 .1668098
------------------------------------------------------------------------------
Included instruments: __00000R __00000U __00000E __00000L __00000O
------------------------------------------------------------------------------
F test of excluded instruments:
F( 2, 27825) = 3528.57
Prob> F = 0.0000
Angrist-Pischke multivariate F test of excluded instruments:
F( 2, 27825) = 3528.57
Prob> F = 0.0000
Summary results for first-stage regressions
-------------------------------------------
(Underid) (Weak id)
Variable | F( 2, 27825) P-val | AP Chi-sq( 2) P-val | AP F( 2, 27825)
__00000I | 3528.57 0.0000 | 7058.41 0.0000 | 3528.57
Stock-Yogo weak ID test critical values for single endogenous regressor:
10% maximal IV size 19.93
15% maximal IV size 11.59
20% maximal IV size 8.75
25% maximal IV size 7.25
Source: Stock-Yogo (2005). Reproduced by permission.
Underidentification test
Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified)
Ha: matrix has rank=K1 (identified)
Anderson canon. corr. LM statistic Chi-sq(2)=5630.40 P-val=0.0000
Weak identification test
Ho: equation is weakly identified
Cragg-Donald Wald F statistic 3528.57
Stock-Yogo weak ID test critical values for K1=1 and L1=2:
10% maximal IV size 19.93
15% maximal IV size 11.59
20% maximal IV size 8.75
25% maximal IV size 7.25
Source: Stock-Yogo (2005). Reproduced by permission.
Weak-instrument-robust inference
Tests of joint significance of endogenous regressors B1 in main equation
Ho: B1=0 and orthogonality conditions are valid
Anderson-Rubin Wald test F(2,27825)= 13.53 P-val=0.0000
Anderson-Rubin Wald test Chi-sq(2)= 27.06 P-val=0.0000
Stock-Wright LM S statistic Chi-sq(2)= 27.03 P-val=0.0000
Number of observations N = 27830
Number of regressors K = 4
Number of endogenous regressors K1 = 1
Number of instruments L = 5
Number of excluded instruments L1 = 2
IV (2SLS) estimation
--------------------
Estimates efficient for homoskedasticity only
Statistics consistent for homoskedasticity only
Number of obs = 27830
F( 4, 27826) = 3.6e+05
Prob> F = 0.0000
Total (centered) SS = 122387579.2 Centered R2 = 0.8485
Total (uncentered) SS = 976762125.4 Uncentered R2 = 0.9810
Residual SS = 18546537.84 Root MSE = 25.82
------------------------------------------------------------------------------
__00000G | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
__00000I | 9.999284 1.941276 5.15 0.000 6.194454 13.80412
__00000R | 74.19692 .3810826 194.70 0.000 73.45002 74.94383
__00000U | -7.926549 .094021 -84.31 0.000 -8.110827 -7.742271
__00000E | 475.1334 .6554887 724.85 0.000 473.8487 476.4181
------------------------------------------------------------------------------
Underidentification test (Anderson canon. corr. LM statistic): 5630.398
Chi-sq(2) P-val = 0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic): 3528.573
Stock-Yogo weak ID test critical values: 10% maximal IV size 19.93
15% maximal IV size 11.59
20% maximal IV size 8.75
25% maximal IV size 7.25
Source: Stock-Yogo (2005). Reproduced by permission.
------------------------------------------------------------------------------
Sargan statistic (overidentification test of all instruments): 0.577
Chi-sq(1) P-val = 0.4474
------------------------------------------------------------------------------
Instrumented: __00000I
Included instruments: __00000R __00000U __00000E
Excluded instruments: __00000L __00000O
------------------------------------------------------------------------------
Test of overidentifying restrictions:
Cross-section time-series model: xtivreg g2sls
Sargan-Hansen statistic 0.577 Chi-sq(1) P-value = 0.4474
Can anyone tell me how to get what I want, the regular first stage F-stat, from all this? I'd very much appreciate your help.
Thanks for your consideration, folks,
Diego Torres
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/