-------------------------------------------------------------------------------------------
       log:  /Users/baum/doc/Stata/USUG_2007/baumUKSUG2007smcltalk/ivsmcltalk.smcl
  log type:  smcl
 opened on:   4 Feb 2008, 08:58:09


. *** OLS vs IV estimates

. use griliches76.dta (Wages of Very Young Men, Zvi Griliches, J.Pol.Ec. 1976)

. xi i.year i.year _Iyear_66-73 (naturally coded; _Iyear_66 omitted)

. eststo clear

. eststo:regress lw iq s expr tenure

Source | SS df MS Number of obs = 758 -------------+------------------------------ F( 4, 753) = 92.70 Model | 45.9575602 4 11.48939 Prob > F = 0.0000 Residual | 93.3285897 753 .12394235 R-squared = 0.3300 -------------+------------------------------ Adj R-squared = 0.3264 Total | 139.28615 757 .183997556 Root MSE = .35205

------------------------------------------------------------------------------ lw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0038838 .0010984 3.54 0.000 .0017275 .0060402 s | .0947161 .0067992 13.93 0.000 .0813685 .1080638 expr | .0390324 .0064421 6.06 0.000 .0263857 .0516791 tenure | .0362904 .0078746 4.61 0.000 .0208317 .0517491 _cons | 3.879516 .1087541 35.67 0.000 3.666019 4.093013 ------------------------------------------------------------------------------ (est1 stored)

. eststo:ivreg2 lw s expr tenure (iq=med)

IV (2SLS) estimation --------------------

Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only

Number of obs = 758 F( 4, 753) = 65.77 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.0752 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9948 Residual SS = 128.8078366 Root MSE = .4122

------------------------------------------------------------------------------ lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0224682 .0119996 1.87 0.061 -.0010505 .0459869 s | .0377993 .0373956 1.01 0.312 -.0354948 .1110934 expr | .0460304 .0087797 5.24 0.000 .0288226 .0632383 tenure | .0275642 .0107888 2.55 0.011 .0064185 .0487099 _cons | 2.716219 .7575702 3.59 0.000 1.231409 4.201029 ------------------------------------------------------------------------------ Underidentification test (Anderson canon. corr. LM statistic): 8.708 Chi-sq(1) P-val = 0.0032 ------------------------------------------------------------------------------ Weak identification test (Cragg-Donald Wald F statistic): 8.751 Stock-Yogo weak ID test critical values: 10% maximal IV size 16.38 15% maximal IV size 8.96 20% maximal IV size 6.66 25% maximal IV size 5.53 Source: Stock-Yogo (2005). Reproduced by permission. ------------------------------------------------------------------------------ Sargan statistic (overidentification test of all instruments): 0.000 (equation exactly identified) ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med ------------------------------------------------------------------------------ (est2 stored)

. esttab, label stat(rmse) mtitles(OLS IV) nonum

---------------------------------------------------- OLS IV ---------------------------------------------------- iq score 0.00388*** 0.0225 (3.54) (1.87)

completed years of~g 0.0947*** 0.0378 (13.93) (1.01)

experience, years 0.0390*** 0.0460*** (6.06) (5.24)

tenure, years 0.0363*** 0.0276* (4.61) (2.55)

Constant 3.880*** 2.716*** (35.67) (3.59) ---------------------------------------------------- rmse 0.352 0.412 ---------------------------------------------------- t statistics in parentheses * p<0.05, ** p<0.01, *** p<0.001

. *** IV, IV (robust) vs IV-GMM estimates

. eststo clear

. eststo:ivreg2 lw s expr tenure (iq=med kww age)

IV (2SLS) estimation --------------------

Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only

Number of obs = 758 F( 4, 753) = 82.57 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.2706 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9959 Residual SS = 101.5955325 Root MSE = .3661

------------------------------------------------------------------------------ lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | -.005087 .0047901 -1.06 0.288 -.0144754 .0043014 s | .1221904 .0159051 7.68 0.000 .091017 .1533638 expr | .0356544 .0069244 5.15 0.000 .0220827 .049226 tenure | .0405027 .0084751 4.78 0.000 .0238918 .0571136 _cons | 4.44105 .3123805 14.22 0.000 3.828796 5.053304 ------------------------------------------------------------------------------ Underidentification test (Anderson canon. corr. LM statistic): 43.103 Chi-sq(3) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Cragg-Donald Wald F statistic): 15.093 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 13.91 10% maximal IV relative bias 9.08 20% maximal IV relative bias 6.46 30% maximal IV relative bias 5.39 10% maximal IV size 22.30 15% maximal IV size 12.83 20% maximal IV size 9.54 25% maximal IV size 7.80 Source: Stock-Yogo (2005). Reproduced by permission. ------------------------------------------------------------------------------ Sargan statistic (overidentification test of all instruments): 62.791 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww age ------------------------------------------------------------------------------ (est1 stored)

. eststo:ivreg2 lw s expr tenure (iq=med kww age), robust

IV (2SLS) estimation --------------------

Estimates efficient for homoskedasticity only Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 79.80 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.2706 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9959 Residual SS = 101.5955325 Root MSE = .3661

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | -.005087 .0050608 -1.01 0.315 -.0150061 .004832 s | .1221904 .0162798 7.51 0.000 .0902826 .1540982 expr | .0356544 .0069916 5.10 0.000 .0219512 .0493576 tenure | .0405027 .0089728 4.51 0.000 .0229164 .058089 _cons | 4.44105 .3362515 13.21 0.000 3.782009 5.100091 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 36.930 Chi-sq(3) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.369 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 13.91 10% maximal IV relative bias 9.08 20% maximal IV relative bias 6.46 30% maximal IV relative bias 5.39 10% maximal IV size 22.30 15% maximal IV size 12.83 20% maximal IV size 9.54 25% maximal IV size 7.80 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 49.842 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww age ------------------------------------------------------------------------------ (est2 stored)

. eststo:ivreg2 lw s expr tenure (iq=med kww age), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 83.09 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.2458 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9957 Residual SS = 105.0480035 Root MSE = .3723

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | -.0067642 .005053 -1.34 0.181 -.016668 .0031395 s | .1279205 .0162386 7.88 0.000 .0960935 .1597475 expr | .0367674 .0069872 5.26 0.000 .0230729 .050462 tenure | .0442816 .0089293 4.96 0.000 .0267805 .0617828 _cons | 4.522535 .3360249 13.46 0.000 3.863939 5.181132 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 36.930 Chi-sq(3) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.369 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 13.91 10% maximal IV relative bias 9.08 20% maximal IV relative bias 6.46 30% maximal IV relative bias 5.39 10% maximal IV size 22.30 15% maximal IV size 12.83 20% maximal IV size 9.54 25% maximal IV size 7.80 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 49.842 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww age ------------------------------------------------------------------------------ (est3 stored)

. esttab, label stat(rmse) mtitles(IV IVrob IVGMMrob) nonum

-------------------------------------------------------------------- IV IVrob IVGMMrob -------------------------------------------------------------------- iq score -0.00509 -0.00509 -0.00676 (-1.06) (-1.01) (-1.34)

completed years of~g 0.122*** 0.122*** 0.128*** (7.68) (7.51) (7.88)

experience, years 0.0357*** 0.0357*** 0.0368*** (5.15) (5.10) (5.26)

tenure, years 0.0405*** 0.0405*** 0.0443*** (4.78) (4.51) (4.96)

Constant 4.441*** 4.441*** 4.523*** (14.22) (13.21) (13.46) -------------------------------------------------------------------- rmse 0.366 0.366 0.372 -------------------------------------------------------------------- t statistics in parentheses * p<0.05, ** p<0.01, *** p<0.001

. *** Tests of overidentifying restrictions

. eststo clear

. eststo:ivreg2 lw s expr tenure (iq=med kww age), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 83.09 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.2458 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9957 Residual SS = 105.0480035 Root MSE = .3723

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | -.0067642 .005053 -1.34 0.181 -.016668 .0031395 s | .1279205 .0162386 7.88 0.000 .0960935 .1597475 expr | .0367674 .0069872 5.26 0.000 .0230729 .050462 tenure | .0442816 .0089293 4.96 0.000 .0267805 .0617828 _cons | 4.522535 .3360249 13.46 0.000 3.863939 5.181132 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 36.930 Chi-sq(3) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.369 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 13.91 10% maximal IV relative bias 9.08 20% maximal IV relative bias 6.46 30% maximal IV relative bias 5.39 10% maximal IV size 22.30 15% maximal IV size 12.83 20% maximal IV size 9.54 25% maximal IV size 7.80 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 49.842 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww age ------------------------------------------------------------------------------ (est1 stored)

. eststo:ivreg2 lw s expr tenure (iq=med kww), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 73.34 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1813 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 114.029907 Root MSE = .3879

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0180792 .0060816 2.97 0.003 .0061595 .0299988 s | .0513881 .0195616 2.63 0.009 .013048 .0897281 expr | .0439692 .0078796 5.58 0.000 .0285254 .059413 tenure | .0302889 .0087102 3.48 0.001 .0132173 .0473606 _cons | 2.988533 .3944466 7.58 0.000 2.215432 3.761634 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 26.252 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.892 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. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.282 Chi-sq(1) P-val = 0.5955 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------ (est2 stored)

. esttab, label stat(j jdf jp) mtitles(age no_age) nonum

---------------------------------------------------- age no_age ---------------------------------------------------- iq score -0.00676 0.0181** (-1.34) (2.97)

completed years of~g 0.128*** 0.0514** (7.88) (2.63)

experience, years 0.0368*** 0.0440*** (5.26) (5.58)

tenure, years 0.0443*** 0.0303*** (4.96) (3.48)

Constant 4.523*** 2.989*** (13.46) (7.58) ---------------------------------------------------- j 49.84 0.282 jdf 2 1 jp 1.50e-11 0.595 ---------------------------------------------------- t statistics in parentheses * p<0.05, ** p<0.01, *** p<0.001

. *** C (GMM distance) test of a subset of overidentifying restrictions

. ivreg2 lw s expr tenure (iq=med kww age), gmm2s robust orthog(age)

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 83.09 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.2458 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9957 Residual SS = 105.0480035 Root MSE = .3723

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | -.0067642 .005053 -1.34 0.181 -.016668 .0031395 s | .1279205 .0162386 7.88 0.000 .0960935 .1597475 expr | .0367674 .0069872 5.26 0.000 .0230729 .050462 tenure | .0442816 .0089293 4.96 0.000 .0267805 .0617828 _cons | 4.522535 .3360249 13.46 0.000 3.863939 5.181132 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 36.930 Chi-sq(3) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.369 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 13.91 10% maximal IV relative bias 9.08 20% maximal IV relative bias 6.46 30% maximal IV relative bias 5.39 10% maximal IV size 22.30 15% maximal IV size 12.83 20% maximal IV size 9.54 25% maximal IV size 7.80 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 49.842 Chi-sq(2) P-val = 0.0000 -orthog- option: Hansen J statistic (eqn. excluding suspect orthog. conditions): 0.275 Chi-sq(1) P-val = 0.6003 C statistic (exogeneity/orthogonality of suspect instruments): 49.567 Chi-sq(1) P-val = 0.0000 Instruments tested: age ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww age ------------------------------------------------------------------------------

. *** C (GMM distance) test of endogeneity of a regressor

. ivreg2 lw s expr tenure (iq=med kww), gmm2s robust endog(iq)

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 73.34 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1813 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 114.029907 Root MSE = .3879

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0180792 .0060816 2.97 0.003 .0061595 .0299988 s | .0513881 .0195616 2.63 0.009 .013048 .0897281 expr | .0439692 .0078796 5.58 0.000 .0285254 .059413 tenure | .0302889 .0087102 3.48 0.001 .0132173 .0473606 _cons | 2.988533 .3944466 7.58 0.000 2.215432 3.761634 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 26.252 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.892 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. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.282 Chi-sq(1) P-val = 0.5955 -endog- option: Endogeneity test of endogenous regressors: 6.490 Chi-sq(1) P-val = 0.0108 Regressors tested: iq ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------

. *** Test of exclusion of an instrument

. ivreg2 lw s expr tenure age (iq=med kww), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 5, 752) = 85.91 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.3818 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9965 Residual SS = 86.10164994 Root MSE = .337

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0080733 .0047316 1.71 0.088 -.0012004 .017347 s | .0420584 .0172895 2.43 0.015 .0081716 .0759452 expr | .0053162 .0073158 0.73 0.467 -.0090225 .0196548 tenure | .0118452 .0080135 1.48 0.139 -.0038609 .0275513 age | .052537 .006308 8.33 0.000 .0401735 .0649005 _cons | 3.105592 .334664 9.28 0.000 2.449663 3.761522 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 32.815 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 18.873 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. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 3.866 Chi-sq(1) P-val = 0.0493 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure age Excluded instruments: med kww ------------------------------------------------------------------------------

. *** Analysis of first stage regressions

. ivreg2 lw s expr tenure (iq=med kww), first

First-stage regressions -----------------------

First-stage regression of iq:

OLS estimation --------------

Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only

Number of obs = 758 F( 5, 752) = 64.09 Prob > F = 0.0000 Total (centered) SS = 140399.3259 Centered R2 = 0.2988 Total (uncentered) SS = 8316271 Uncentered R2 = 0.9882 Residual SS = 98448.15814 Root MSE = 11.44

------------------------------------------------------------------------------ iq | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- s | 2.480376 .2177002 11.39 0.000 2.053004 2.907749 expr | -.4446049 .2109757 -2.11 0.035 -.8587763 -.0304335 tenure | .2372269 .2602616 0.91 0.362 -.2736987 .7481525 med | .4114398 .1626099 2.53 0.012 .0922165 .7306632 kww | .3100834 .0637504 4.86 0.000 .1849335 .4352334 _cons | 55.11403 3.050712 18.07 0.000 49.12511 61.10296 ------------------------------------------------------------------------------ Included instruments: s expr tenure med kww ------------------------------------------------------------------------------ Partial R-squared of excluded instruments: 0.0416 Test of excluded instruments: F( 2, 752) = 16.34 Prob > F = 0.0000





Summary results for first-stage regressions -------------------------------------------

Variable | Shea Partial R2 | Partial R2 | F( 2, 752) P-value iq | 0.0416 | 0.0416 | 16.34 0.0000

Underidentification tests Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified) Ha: matrix has rank=K1 (identified) Anderson canon. corr. N*CCEV LM statistic Chi-sq(2)=31.56 P-val=0.0000 Cragg-Donald N*CDEV Wald statistic Chi-sq(2)=32.93 P-val=0.0000

Weak identification test Ho: equation is weakly identified Cragg-Donald Wald F-statistic 16.34 See main output for Cragg-Donald weak id test critical values

Weak-instrument-robust inference Tests of joint significance of endogenous regressors B1 in main equation Ho: B1=0 and overidentifying restrictions are valid Anderson-Rubin Wald test F(2,752)= 5.60 P-val=0.0038 Anderson-Rubin Wald test Chi-sq(2)=11.29 P-val=0.0035 Stock-Wright LM S statistic Chi-sq(2)=11.13 P-val=0.0038

Number of observations N = 758 Number of regressors K = 5 Number of instruments L = 6 Number of excluded instruments L1 = 2

IV (2SLS) estimation --------------------

Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only

Number of obs = 758 F( 4, 753) = 76.06 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1868 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 113.2686615 Root MSE = .3866

------------------------------------------------------------------------------ lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0178162 .0059106 3.01 0.003 .0062317 .0294006 s | .0520467 .0192293 2.71 0.007 .014358 .0897355 expr | .0442787 .0074016 5.98 0.000 .0297719 .0587855 tenure | .0297485 .0090632 3.28 0.001 .0119849 .0475121 _cons | 3.007415 .3813668 7.89 0.000 2.25995 3.75488 ------------------------------------------------------------------------------ Underidentification test (Anderson canon. corr. LM statistic): 31.563 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Cragg-Donald Wald F statistic): 16.337 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.236 Chi-sq(1) P-val = 0.6271 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------

. *** Test of redundant instruments

. ivreg2 lw s expr tenure (iq=med kww mrt), gmm2s robust redundant(mrt)

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 92.93 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.3195 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9962 Residual SS = 94.77728956 Root MSE = .3536

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0074936 .0053383 1.40 0.160 -.0029693 .0179566 s | .0873873 .0168376 5.19 0.000 .0543862 .1203885 expr | .0419055 .0070187 5.97 0.000 .0281491 .0556618 tenure | .0360493 .0082091 4.39 0.000 .0199598 .0521388 _cons | 3.589868 .3534248 10.16 0.000 2.897168 4.282568 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 27.814 Chi-sq(3) P-val = 0.0000 -redundant- option: IV redundancy test (LM test of redundancy of specified instruments): 3.859 Chi-sq(1) P-val = 0.0495 Instruments tested: mrt ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 10.450 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 13.91 10% maximal IV relative bias 9.08 20% maximal IV relative bias 6.46 30% maximal IV relative bias 5.39 10% maximal IV size 22.30 15% maximal IV size 12.83 20% maximal IV size 9.54 25% maximal IV size 7.80 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 29.272 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww mrt ------------------------------------------------------------------------------

. *** IV-GMM, LIML and GMM-CUE estimation

. eststo clear

. eststo:ivreg2 lw s expr tenure (iq=med kww), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 73.34 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1813 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 114.029907 Root MSE = .3879

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0180792 .0060816 2.97 0.003 .0061595 .0299988 s | .0513881 .0195616 2.63 0.009 .013048 .0897281 expr | .0439692 .0078796 5.58 0.000 .0285254 .059413 tenure | .0302889 .0087102 3.48 0.001 .0132173 .0473606 _cons | 2.988533 .3944466 7.58 0.000 2.215432 3.761634 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 26.252 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.892 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. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.282 Chi-sq(1) P-val = 0.5955 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------ (est1 stored)

. eststo:ivreg2 lw s expr tenure (iq=med kww), liml robust

LIML estimation --------------- k =1.00031 lambda =1.00031

Estimates efficient for homoskedasticity only Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 72.21 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1846 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 113.5698821 Root MSE = .3871

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .017921 .0061533 2.91 0.004 .0058608 .0299813 s | .0517257 .0197542 2.62 0.009 .0130082 .0904431 expr | .0443182 .0079168 5.60 0.000 .0288015 .0598348 tenure | .0296993 .0087853 3.38 0.001 .0124804 .0469182 _cons | 3.000853 .3991823 7.52 0.000 2.21847 3.783236 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 26.252 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.892 Stock-Yogo weak ID test critical values: 10% maximal LIML size 8.68 15% maximal LIML size 5.33 20% maximal LIML size 4.42 25% maximal LIML size 3.92 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.281 Chi-sq(1) P-val = 0.5960 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------ (est2 stored)

. eststo:ivreg2 lw s expr tenure (iq=med kww), cue robust

initial: neg GMM obj function -J = -.2800569 rescale: neg GMM obj function -J = -.2800569 Iteration 0: neg GMM obj function -J = -.2800569 Iteration 1: neg GMM obj function -J = -.27958082 Iteration 2: neg GMM obj function -J = -.2795808

CUE estimation --------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 72.64 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1785 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 114.4206733 Root MSE = .3885

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0182125 .0061123 2.98 0.003 .0062327 .0301924 s | .0509811 .0196652 2.59 0.010 .0124381 .0895241 expr | .0439934 .0079334 5.55 0.000 .0284442 .0595426 tenure | .0302229 .0087319 3.46 0.001 .0131087 .0473372 _cons | 2.980213 .3963628 7.52 0.000 2.203356 3.75707 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 26.252 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.892 Stock-Yogo weak ID test critical values: 10% maximal LIML size 8.68 15% maximal LIML size 5.33 20% maximal LIML size 4.42 25% maximal LIML size 3.92 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.280 Chi-sq(1) P-val = 0.5970 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------ (est3 stored)

. esttab, label stat(rmse) mtitles(IVGMM LIML GMM-CUE) nonum

-------------------------------------------------------------------- IVGMM LIML GMM-CUE -------------------------------------------------------------------- iq score 0.0181** 0.0179** 0.0182** (2.97) (2.91) (2.98)

completed years of~g 0.0514** 0.0517** 0.0510** (2.63) (2.62) (2.59)

experience, years 0.0440*** 0.0443*** 0.0440*** (5.58) (5.60) (5.55)

tenure, years 0.0303*** 0.0297*** 0.0302*** (3.48) (3.38) (3.46)

Constant 2.989*** 3.001*** 2.980*** (7.58) (7.52) (7.52) -------------------------------------------------------------------- rmse 0.388 0.387 0.389 -------------------------------------------------------------------- t statistics in parentheses * p<0.05, ** p<0.01, *** p<0.001

. *** Stock-Yogo critical values for Cragg-Donald F statistic and robust equivalent

. ivreg2 lw s expr tenure (iq=med kww)

IV (2SLS) estimation --------------------

Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only

Number of obs = 758 F( 4, 753) = 76.06 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1868 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 113.2686615 Root MSE = .3866

------------------------------------------------------------------------------ lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0178162 .0059106 3.01 0.003 .0062317 .0294006 s | .0520467 .0192293 2.71 0.007 .014358 .0897355 expr | .0442787 .0074016 5.98 0.000 .0297719 .0587855 tenure | .0297485 .0090632 3.28 0.001 .0119849 .0475121 _cons | 3.007415 .3813668 7.89 0.000 2.25995 3.75488 ------------------------------------------------------------------------------ Underidentification test (Anderson canon. corr. LM statistic): 31.563 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Cragg-Donald Wald F statistic): 16.337 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.236 Chi-sq(1) P-val = 0.6271 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------

. ivreg2 lw s expr tenure (iq=med kww), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 758 F( 4, 753) = 73.34 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = 0.1813 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9954 Residual SS = 114.029907 Root MSE = .3879

------------------------------------------------------------------------------ | Robust lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | .0180792 .0060816 2.97 0.003 .0061595 .0299988 s | .0513881 .0195616 2.63 0.009 .013048 .0897281 expr | .0439692 .0078796 5.58 0.000 .0285254 .059413 tenure | .0302889 .0087102 3.48 0.001 .0132173 .0473606 _cons | 2.988533 .3944466 7.58 0.000 2.215432 3.761634 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 26.252 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 14.892 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. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.282 Chi-sq(1) P-val = 0.5955 ------------------------------------------------------------------------------ Instrumented: iq Included instruments: s expr tenure Excluded instruments: med kww ------------------------------------------------------------------------------

. *** Regression on an endogenous dummy variable: IV and Basmann methods

. sysuse auto,clear (1978 Automobile Data)

. eststo clear

. eststo:regress price foreign,robust

Linear regression Number of obs = 74 F( 1, 72) = 0.20 Prob > F = 0.6577 R-squared = 0.0024 Root MSE = 2966.4

------------------------------------------------------------------------------ | Robust price | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- foreign | 312.2587 701.7814 0.44 0.658 -1086.717 1711.234 _cons | 6072.423 431.2084 14.08 0.000 5212.825 6932.021 ------------------------------------------------------------------------------ (est1 stored)

. eststo:ivreg2 price (foreign=mpg displacement), endog(foreign) gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 74 F( 1, 72) = 12.16 Prob > F = 0.0008 Total (centered) SS = 635065396.1 Centered R2 = -0.8552 Total (uncentered) SS = 3447834321 Uncentered R2 = 0.6583 Residual SS = 1178158035 Root MSE = 3990

------------------------------------------------------------------------------ | Robust price | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- foreign | -5612.9 1587.631 -3.54 0.000 -8724.599 -2501.201 _cons | 7675.546 679.7433 11.29 0.000 6343.274 9007.818 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 29.152 Chi-sq(2) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 23.153 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. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 1.465 Chi-sq(1) P-val = 0.2262 -endog- option: Endogeneity test of endogenous regressors: 15.520 Chi-sq(1) P-val = 0.0001 Regressors tested: foreign ------------------------------------------------------------------------------ Instrumented: foreign Excluded instruments: mpg displacement ------------------------------------------------------------------------------ (est2 stored)

. qui logit foreign mpg displacement price

. predict double forhat (option pr assumed; Pr(foreign))

. eststo:ivreg2 price (foreign=forhat), gmm2s robust

2-Step GMM estimation ---------------------

Estimates efficient for arbitrary heteroskedasticity Statistics robust to heteroskedasticity

Number of obs = 74 F( 1, 72) = 0.23 Prob > F = 0.6329 Total (centered) SS = 635065396.1 Centered R2 = 0.0021 Total (uncentered) SS = 3447834321 Uncentered R2 = 0.8162 Residual SS = 633759971 Root MSE = 2926

------------------------------------------------------------------------------ | Robust price | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- foreign | 426.5552 877.1113 0.49 0.627 -1292.551 2145.662 _cons | 6038.443 467.1296 12.93 0.000 5122.886 6954 ------------------------------------------------------------------------------ Underidentification test (Kleibergen-Paap rk LM statistic): 34.426 Chi-sq(1) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Kleibergen-Paap rk Wald F statistic): 196.260 Stock-Yogo weak ID test critical values: 10% maximal IV size 16.38 15% maximal IV size 8.96 20% maximal IV size 6.66 25% maximal IV size 5.53 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Hansen J statistic (overidentification test of all instruments): 0.000 (equation exactly identified) ------------------------------------------------------------------------------ Instrumented: foreign Excluded instruments: forhat ------------------------------------------------------------------------------ (est3 stored)

. esttab, label stat(rmse) se mtitles(OLS IV-GMM Basmann) nonum

-------------------------------------------------------------------- OLS IV-GMM Basmann -------------------------------------------------------------------- Car type 312.3 -5612.9*** 426.6 (701.8) (1587.6) (877.1)

Constant 6072.4*** 7675.5*** 6038.4*** (431.2) (679.7) (467.1) -------------------------------------------------------------------- rmse 2966.4 3990.1 2926.5 -------------------------------------------------------------------- Standard errors in parentheses * p<0.05, ** p<0.01, *** p<0.001

. *** The forbidden regression

. use griliches76.dta, clear (Wages of Very Young Men, Zvi Griliches, J.Pol.Ec. 1976)

. qui regress iq s expr tenure

. predict double iqhat, xb

. label var iqhat iqhat

. generate double iq2hat = (iqhat^2)/1000

. generate double s2 = s^2

. generate double expr2 = expr^2

. generate double tenure2 = tenure^2

. generate double sexpr = s*expr

. generate double sten = s*tenure

. generate double xten = expr*tenure

. eststo clear

. eststo: regress lw iqhat iq2hat tenure

Source | SS df MS Number of obs = 758 -------------+------------------------------ F( 3, 754) = 94.71 Model | 38.1228132 3 12.7076044 Prob > F = 0.0000 Residual | 101.163337 754 .134168882 R-squared = 0.2737 -------------+------------------------------ Adj R-squared = 0.2708 Total | 139.28615 757 .183997556 Root MSE = .36629

------------------------------------------------------------------------------ lw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- iqhat | -.1131037 .0541035 -2.09 0.037 -.2193151 -.0068924 iq2hat | .6787579 .256789 2.64 0.008 .1746515 1.182864 tenure | .0369274 .0079612 4.64 0.000 .0212986 .0525562 _cons | 10.01075 2.840088 3.52 0.000 4.43533 15.58617 ------------------------------------------------------------------------------ (est1 stored)

. generate double iq2 = (iq^2)/1000

. eststo: ivreg2 lw tenure (iq iq2 = s s2 expr expr2 tenure2 sexpr sten xten)

IV (2SLS) estimation --------------------

Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only

Number of obs = 758 F( 3, 754) = 42.36 Prob > F = 0.0000 Total (centered) SS = 139.2861498 Centered R2 = -0.7673 Total (uncentered) SS = 24652.24662 Uncentered R2 = 0.9900 Residual SS = 246.164499 Root MSE = .5699

------------------------------------------------------------------------------ lw | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- iq | -.2576697 .0678624 -3.80 0.000 -.3906775 -.1246618 iq2 | 1.396272 .3309028 4.22 0.000 .7477143 2.044829 tenure | .0361486 .012388 2.92 0.004 .0118685 .0604287 _cons | 17.06217 3.424798 4.98 0.000 10.34969 23.77466 ------------------------------------------------------------------------------ Underidentification test (Anderson canon. corr. LM statistic): 42.894 Chi-sq(7) P-val = 0.0000 ------------------------------------------------------------------------------ Weak identification test (Cragg-Donald Wald F statistic): 5.608 Stock-Yogo weak ID test critical values: 5% maximal IV relative bias 17.70 10% maximal IV relative bias 10.22 20% maximal IV relative bias 6.20 30% maximal IV relative bias 4.73 10% maximal IV size 25.64 15% maximal IV size 14.31 20% maximal IV size 10.41 25% maximal IV size 8.39 Source: Stock-Yogo (2005). Reproduced by permission. ------------------------------------------------------------------------------ Sargan statistic (overidentification test of all instruments): 17.872 Chi-sq(6) P-val = 0.0066 ------------------------------------------------------------------------------ Instrumented: iq iq2 Included instruments: tenure Excluded instruments: s s2 expr expr2 tenure2 sexpr sten xten ------------------------------------------------------------------------------ (est2 stored)

. esttab, label mtitles(Forbidden NL-IV) nonum se

---------------------------------------------------- Forbidden NL-IV ---------------------------------------------------- iqhat -0.113* (0.0541)

iq2hat 0.679** (0.257)

tenure, years 0.0369*** 0.0361** (0.00796) (0.0124)

iq score -0.258*** (0.0679)

iq2 1.396*** (0.331)

Constant 10.01*** 17.06*** (2.840) (3.425) ---------------------------------------------------- Observations 758 758 ---------------------------------------------------- Standard errors in parentheses * p<0.05, ** p<0.01, *** p<0.001

. log close log: /Users/baum/doc/Stata/USUG_2007/baumUKSUG2007smcltalk/ivsmcltalk.smcl log type: smcl closed on: 4 Feb 2008, 09:03:43 -------------------------------------------------------------------------------------------