------------------------------------------------------------------------------ log: d:\bill\fall2008\ecoe60303\qob1.log log type: text opened on: 24 Oct 2008, 14:43:07 . *read in sata data file; . use qob1; . * construct qob 1 dummy variables; . gen qob1=qob==1; . * get reduced-forms for wald estimate; . * compare to table III, panel B; . reg educ qob1; Source | SS df MS Number of obs = 329509 -------------+------------------------------ F( 1,329507) = 67.57 Model | 727.393312 1 727.393312 Prob > F = 0.0000 Residual | 3546940.27329507 10.7643852 R-squared = 0.0002 -------------+------------------------------ Adj R-squared = 0.0002 Total | 3547667.66329508 10.76656 Root MSE = 3.2809 ------------------------------------------------------------------------------ educ | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- qob1 | -.1088179 .0132376 -8.22 0.000 -.1347633 -.0828725 _cons | 12.79688 .0065904 1941.75 0.000 12.78397 12.8098 ------------------------------------------------------------------------------ . reg earnwkl qob1; Source | SS df MS Number of obs = 329509 -------------+------------------------------ F( 1,329507) = 16.42 Model | 7.56705582 1 7.56705582 Prob > F = 0.0001 Residual | 151830.3329507 .460780197 R-squared = 0.0000 -------------+------------------------------ Adj R-squared = 0.0000 Total | 151837.867329508 .460801763 Root MSE = .67881 ------------------------------------------------------------------------------ earnwkl | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- qob1 | -.0110989 .0027388 -4.05 0.000 -.0164669 -.0057309 _cons | 5.902694 .0013635 4329.00 0.000 5.900022 5.905367 ------------------------------------------------------------------------------ . * get wald estimate; . * notice the t-stat on the wald nearly the same; . * as the t-stat on the reduced-form; . ivregress 2sls earnwkl (educ=qob1); Instrumental variables (2SLS) regression Number of obs = 329509 Wald chi2(1) = 18.14 Prob > chi2 = 0.0000 R-squared = 0.0946 Root MSE = .64591 ------------------------------------------------------------------------------ earnwkl | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .101995 .0239489 4.26 0.000 .055056 .148934 _cons | 4.597477 .3058276 15.03 0.000 3.998065 5.196888 ------------------------------------------------------------------------------ Instrumented: educ Instruments: qob1 . *run ols, one variable; . reg earnwkl educ; Source | SS df MS Number of obs = 329509 -------------+------------------------------ F( 1,329507) =43782.55 Model | 17808.8282 1 17808.8282 Prob > F = 0.0000 Residual | 134029.039329507 .406756273 R-squared = 0.1173 -------------+------------------------------ Adj R-squared = 0.1173 Total | 151837.867329508 .460801763 Root MSE = .63777 ------------------------------------------------------------------------------ earnwkl | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .070851 .0003386 209.24 0.000 .0701874 .0715147 _cons | 4.995182 .0044644 1118.88 0.000 4.986432 5.003932 ------------------------------------------------------------------------------ . * get correlation coefficient for; . * educ and qob1; . corr educ qob1; (obs=329509) | educ qob1 -------------+------------------ educ | 1.0000 qob1 | -0.0143 1.0000 . * get dummies needed for the models; . xi i.yob*i.qob; i.yob _Iyob_30-39 (naturally coded; _Iyob_30 omitted) i.qob _Iqob_1-4 (naturally coded; _Iqob_1 omitted) i.yob*i.qob _IyobXqob_#_# (coded as above) . compress; qob1 was float now byte . * run ols controlling for yob effects; . * compare to column (1), table V; . reg earnwkl educ _Iyob_*; Source | SS df MS Number of obs = 329509 -------------+------------------------------ F( 10,329498) = 4397.45 Model | 17878.1574 10 1787.81574 Prob > F = 0.0000 Residual | 133959.71329498 .406556975 R-squared = 0.1177 -------------+------------------------------ Adj R-squared = 0.1177 Total | 151837.867329508 .460801763 Root MSE = .63762 ------------------------------------------------------------------------------ earnwkl | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .071081 .000339 209.67 0.000 .0704166 .0717455 _Iyob_31 | -.0063875 .0050393 -1.27 0.205 -.0162644 .0034895 _Iyob_32 | -.0148384 .0049724 -2.98 0.003 -.0245841 -.0050927 _Iyob_33 | -.0175832 .0050325 -3.49 0.000 -.0274468 -.0077195 _Iyob_34 | -.0209993 .0049845 -4.21 0.000 -.0307688 -.0112297 _Iyob_35 | -.0328947 .0049515 -6.64 0.000 -.0425994 -.02319 _Iyob_36 | -.0317808 .0049557 -6.41 0.000 -.0414937 -.0220678 _Iyob_37 | -.0367121 .0049082 -7.48 0.000 -.0463321 -.0270921 _Iyob_38 | -.0368905 .0048656 -7.58 0.000 -.046427 -.0273539 _Iyob_39 | -.0481636 .0048468 -9.94 0.000 -.0576633 -.038664 _cons | 5.017348 .0054706 917.14 0.000 5.006626 5.02807 ------------------------------------------------------------------------------ . * get 2sls controlling for yob effects; . * use xi command to get year effects; . ivregress 2sls earnwkl _Iyob_* (educ=qob1); Instrumental variables (2SLS) regression Number of obs = 329509 Wald chi2(10) = 29.07 Prob > chi2 = 0.0012 R-squared = 0.0912 Root MSE = .64714 ------------------------------------------------------------------------------ earnwkl | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .1048562 .0245629 4.27 0.000 .0567138 .1529987 _Iyob_31 | -.011058 .0061395 -1.80 0.072 -.0230913 .0009753 _Iyob_32 | -.0208163 .0066607 -3.13 0.002 -.0338711 -.0077616 _Iyob_33 | -.0254722 .007681 -3.32 0.001 -.0405267 -.0104176 _Iyob_34 | -.0299673 .0082536 -3.63 0.000 -.046144 -.0137906 _Iyob_35 | -.0440057 .009515 -4.62 0.000 -.0626548 -.0253566 _Iyob_36 | -.0448547 .0107555 -4.17 0.000 -.0659352 -.0237742 _Iyob_37 | -.051892 .0121104 -4.28 0.000 -.075628 -.0281559 _Iyob_38 | -.0549725 .0140456 -3.91 0.000 -.0825015 -.0274436 _Iyob_39 | -.0675725 .0149464 -4.52 0.000 -.0968669 -.0382781 _cons | 4.596673 .3059553 15.02 0.000 3.997012 5.196334 ------------------------------------------------------------------------------ Instrumented: educ Instruments: _Iyob_31 _Iyob_32 _Iyob_33 _Iyob_34 _Iyob_35 _Iyob_36 _Iyob_37 _Iyob_38 _Iyob_39 qob1 . * run 2sls, qob times yob interactions as instruments; . * compare to column (2), table V; . ivregress 2sls earnwkl _Iyob_* (educ=_Iqob* _IyobX*); Instrumental variables (2SLS) regression Number of obs = 329509 Wald chi2(10) = 41.67 Prob > chi2 = 0.0000 R-squared = 0.1102 Root MSE = .64034 ------------------------------------------------------------------------------ earnwkl | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .0891154 .0161098 5.53 0.000 .0575408 .1206901 _Iyob_31 | -.0088813 .0055293 -1.61 0.108 -.0197185 .0019558 _Iyob_32 | -.0180303 .00575 -3.14 0.002 -.0293001 -.0067606 _Iyob_33 | -.0217955 .0063005 -3.46 0.001 -.0341442 -.0094469 _Iyob_34 | -.0257878 .0065838 -3.92 0.000 -.0386919 -.0128837 _Iyob_35 | -.0388274 .0072664 -5.34 0.000 -.0530693 -.0245856 _Iyob_36 | -.0387617 .0079773 -4.86 0.000 -.0543969 -.0231264 _Iyob_37 | -.0448175 .0087577 -5.12 0.000 -.0619821 -.0276528 _Iyob_38 | -.0465455 .009911 -4.70 0.000 -.0659707 -.0271202 _Iyob_39 | -.0585271 .0104573 -5.60 0.000 -.0790231 -.0380311 _cons | 4.792727 .2006807 23.88 0.000 4.3994 5.186054 ------------------------------------------------------------------------------ Instrumented: educ Instruments: _Iyob_31 _Iyob_32 _Iyob_33 _Iyob_34 _Iyob_35 _Iyob_36 _Iyob_37 _Iyob_38 _Iyob_39 _Iqob_2 _Iqob_3 _Iqob_4 _IyobXqob_31_2 _IyobXqob_31_3 _IyobXqob_31_4 _IyobXqob_32_2 _IyobXqob_32_3 _IyobXqob_32_4 _IyobXqob_33_2 _IyobXqob_33_3 _IyobXqob_33_4 _IyobXqob_34_2 _IyobXqob_34_3 _IyobXqob_34_4 _IyobXqob_35_2 _IyobXqob_35_3 _IyobXqob_35_4 _IyobXqob_36_2 _IyobXqob_36_3 _IyobXqob_36_4 _IyobXqob_37_2 _IyobXqob_37_3 _IyobXqob_37_4 _IyobXqob_38_2 _IyobXqob_38_3 _IyobXqob_38_4 _IyobXqob_39_2 _IyobXqob_39_3 _IyobXqob_39_4 . estat overid; Tests of overidentifying restrictions: Sargan (score) chi2(29)= 25.4394 (p = 0.6553) Basmann chi2(29) = 25.4383 (p = 0.6553) . estat firststage; First-stage regression summary statistics -------------------------------------------------------------------------- | Adjusted Partial Variable | R-sq. R-sq. R-sq. F(30,329469) Prob > F -------------+------------------------------------------------------------ educ | 0.0033 0.0032 0.0004 4.90707 0.0000 -------------------------------------------------------------------------- Minimum eigenvalue statistic = 4.90707 Critical Values # of endogenous regressors: 1 Ho: Instruments are weak # of excluded instruments: 30 --------------------------------------------------------------------- | 5% 10% 20% 30% 2SLS relative bias | 21.42 11.32 6.09 4.29 -----------------------------------+--------------------------------- | 10% 15% 20% 25% 2SLS Size of nominal 5% Wald test | 86.17 44.78 30.72 23.65 LIML Size of nominal 5% Wald test | 3.88 2.18 1.89 1.75 --------------------------------------------------------------------- . * get predicted values; . predict res1, re; . log close; log: d:\bill\fall2008\ecoe60303\qob1.log log type: text closed on: 24 Oct 2008, 14:43:55 ------------------------------------------------------------------------------