|
|
|
||||
|
|
|||||
The data files used for the examples in this text can be downloaded in a zip file from the Stata Web site. You can then use a program such as WinZip to unzip the data files.
Example 9.5 on page 222 using mroz.dta.
use mroz, clear
reg hours lwage educ age kidslt6 kidsge6 nwifeinc
Source | SS df MS Number of obs = 428
-------------+------------------------------ F( 6, 421) = 5.04
Model | 17228385.3 6 2871397.55 Prob > F = 0.0001
Residual | 240082635 421 570267.541 R-squared = 0.0670
-------------+------------------------------ Adj R-squared = 0.0537
Total | 257311020 427 602601.92 Root MSE = 755.16
------------------------------------------------------------------------------
hours | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lwage | -17.40781 54.21544 -0.32 0.748 -123.9745 89.15886
educ | -14.44486 17.96793 -0.80 0.422 -49.76289 20.87316
age | -7.729976 5.52945 -1.40 0.163 -18.59874 3.138791
kidslt6 | -342.5048 100.0059 -3.42 0.001 -539.078 -145.9317
kidsge6 | -115.0205 30.82925 -3.73 0.000 -175.6189 -54.42208
nwifeinc | -4.245807 3.655815 -1.16 0.246 -11.43173 2.940116
_cons | 2114.697 340.1307 6.22 0.000 1446.131 2783.263
------------------------------------------------------------------------------
ivreg2 hours educ age kidslt6 kidsge6 nwifeinc (lwage= exper expersq)
Instrumental variables (2SLS) regression
----------------------------------------
Number of obs = 428
F( 6, 421) = 3.41
Prob > F = 0.0027
Total (centered) SS = 257311019.9 Centered R2 = -1.7732
Total (uncentered) SS = 983895094 Uncentered R2 = 0.2747
Residual SS = 713583269.6 Root MSE = 1291
------------------------------------------------------------------------------
hours | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lwage | 1544.819 476.7913 3.24 0.001 610.3248 2479.312
educ | -177.449 57.66517 -3.08 0.002 -290.4706 -64.4273
age | -10.78409 9.498705 -1.14 0.256 -29.40121 7.833034
kidslt6 | -210.8339 175.4811 -1.20 0.230 -554.7706 133.1028
kidsge6 | -47.55708 56.45049 -0.84 0.400 -158.198 63.08384
nwifeinc | -9.249121 6.427897 -1.44 0.150 -21.84757 3.349327
_cons | 2432.198 589.2929 4.13 0.000 1277.205 3587.191
------------------------------------------------------------------------------
Sargan statistic (overidentification test of all instruments): 0.858
Chi-sq(1) P-val = 0.35425
------------------------------------------------------------------------------
Instrumented: lwage
Instruments: exper expersq educ age kidslt6 kidsge6 nwifeinc
------------------------------------------------------------------------------
reg hours educ age kidslt6 kidsge6 nwifeinc exper expersq if lwage~=.
Source | SS df MS Number of obs = 428
-------------+------------------------------ F( 7, 420) = 9.79
Model | 36102842.8 7 5157548.98 Prob > F = 0.0000
Residual | 221208177 420 526686.136 R-squared = 0.1403
-------------+------------------------------ Adj R-squared = 0.1260
Total | 257311020 427 602601.92 Root MSE = 725.73
------------------------------------------------------------------------------
hours | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | -22.78841 16.43448 -1.39 0.166 -55.09248 9.515669
age | -19.66352 5.894026 -3.34 0.001 -31.24899 -8.078058
kidslt6 | -305.7209 96.45007 -3.17 0.002 -495.3058 -116.1359
kidsge6 | -72.36673 30.36099 -2.38 0.018 -132.0451 -12.68832
nwifeinc | .4438514 3.613498 0.12 0.902 -6.658941 7.546644
exper | 47.00509 14.55649 3.23 0.001 18.39244 75.61774
expersq | -.5136442 .4373576 -1.17 0.241 -1.373327 .3460382
_cons | 2056.643 346.4843 5.94 0.000 1375.583 2737.702
------------------------------------------------------------------------------
test age kidslt6 kidsge6 nwifeinc
( 1) age = 0
( 2) kidslt6 = 0
( 3) kidsge6 = 0
( 4) nwifeinc = 0
F( 4, 420) = 4.80
Prob > F = 0.0009
ivreg2 lwage educ exper expersq (hours=educ age kidslt6 kidsge6 nwifeinc)
Instrumental variables (2SLS) regression
----------------------------------------
Number of obs = 428
F( 4, 423) = 18.80
Prob > F = 0.0000
Total (centered) SS = 223.3274409 Centered R2 = 0.1112
Total (uncentered) SS = 829.5947861 Uncentered R2 = 0.7607
Residual SS = 198.4937964 Root MSE = .68
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hours | .0001608 .0002141 0.75 0.453 -.0002589 .0005805
educ | .1111175 .0152421 7.29 0.000 .0812436 .1409914
exper | .032646 .0179552 1.82 0.069 -.0025456 .0678375
expersq | -.0006765 .00044 -1.54 0.124 -.001539 .0001859
_cons | -.69279 .3048041 -2.27 0.023 -1.290195 -.095385
------------------------------------------------------------------------------
Sargan statistic (overidentification test of all instruments): 2.941
Chi-sq(3) P-val = 0.40084
------------------------------------------------------------------------------
Collinearities detected among instruments: 1 instrument(s) dropped
Instrumented: hours
Instruments: educ age kidslt6 kidsge6 nwifeinc educ exper expersq
------------------------------------------------------------------------------
reg lwage educ age kidslt6 kidsge6 nwifeinc exper expersq
Source | SS df MS Number of obs = 428
-------------+------------------------------ F( 7, 420) = 11.78
Model | 36.6476796 7 5.2353828 Prob > F = 0.0000
Residual | 186.679761 420 .444475622 R-squared = 0.1641
-------------+------------------------------ Adj R-squared = 0.1502
Total | 223.327441 427 .523015084 Root MSE = .66669
------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0998844 .0150975 6.62 0.000 .0702084 .1295604
age | -.0035204 .0054145 -0.65 0.516 -.0141633 .0071225
kidslt6 | -.0558725 .0886034 -0.63 0.529 -.2300339 .1182889
kidsge6 | -.0176484 .027891 -0.63 0.527 -.0724718 .0371749
nwifeinc | .0056942 .0033195 1.72 0.087 -.0008307 .0122192
exper | .0407097 .0133723 3.04 0.002 .0144249 .0669946
expersq | -.0007473 .0004018 -1.86 0.064 -.0015371 .0000424
_cons | -.3579972 .3182963 -1.12 0.261 -.9836494 .2676551
------------------------------------------------------------------------------
test age kidslt6 kidsge6 nwifeinc
( 1) age = 0
( 2) kidslt6 = 0
( 3) kidsge6 = 0
( 4) nwifeinc = 0
F( 4, 420) = 0.91
Prob > F = 0.4555
Example 9.6 on page 235 using mroz.dta.
gen lwagesq = lwage^2
(325 missing values generated)
gen agesq=age^2
gen educsq = educ^2
gen nwifeincsq = nwifeinc^2
ivreg2 hours educ age kidslt6 kidsge6 nwifeinc (lwage lwagesq = exper expersq agesq educsq nwife incsq)
Instrumental variables (2SLS) regression
----------------------------------------
Number of obs = 428
F( 7, 420) = 3.54
Prob > F = 0.0010
Total (centered) SS = 257311019.9 Centered R2 = -1.2003
Total (uncentered) SS = 983895094 Uncentered R2 = 0.4246
Residual SS = 566171251.8 Root MSE = 1150
------------------------------------------------------------------------------
hours | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lwage | 1873.62 630.0193 2.97 0.003 638.8052 3108.436
lwagesq | -437.2911 346.7893 -1.26 0.207 -1116.986 242.4035
educ | -87.8511 65.76994 -1.34 0.182 -216.7578 41.05562
age | -9.142303 8.492916 -1.08 0.282 -25.78811 7.503508
kidslt6 | -185.0554 160.757 -1.15 0.250 -500.1332 130.0225
kidsge6 | -58.18949 49.63412 -1.17 0.241 -155.4706 39.09161
nwifeinc | -7.233422 5.751229 -1.26 0.208 -18.50562 4.03878
_cons | 1657.926 769.9772 2.15 0.031 148.798 3167.053
------------------------------------------------------------------------------
Sargan statistic (overidentification test of all instruments): 2.612
Chi-sq(3) P-val = 0.45537
------------------------------------------------------------------------------
Instrumented: lwage lwagesq
Instruments: exper expersq agesq educsq nwifeincsq educ age kidslt6 kidsge6
nwifeinc
------------------------------------------------------------------------------
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services