WOOLDRIDGE CROSS-SECTION & PANEL DATA ECONOMETRICS– EXAMPLES
CHAPTER 9 – Simultaneous Equations Models
-----------------------------------------------------------------------------------------------
name: SN
log: myReplications\iiexample9
log type: smcl
opened on: 11 Jun 2019, 11:27:56
. **********************************************
. * Solomon Negash - Examples
. * Wooldridge (2016). Economic Analysis of Cross-Section and Panel Data. 2nd ed.
. * STATA Program, version 15.1.
. * Chapter 9 - Simultaneous Equations Models
. * Computer Exercises (Problems)
. ******************** SETUP *********************
. // Example 9.1 (NA)
. // Example 9.2 (NA)
. // Example 9.3 (NA)
. // Example 9.4 (NA)
. // Example 9.5 (Labor Supply for Married, Working Women):
. bcuse mroz, clear nodesc
. reg hours lwage educ age kidslt6 kidsge6 nwifeinc
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(6, 421) = 5.04
Model | 17228385.4 6 2871397.56 Prob > F = 0.0001
Residual | 240082635 421 570267.54 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.87317
age | -7.729976 5.52945 -1.40 0.163 -18.59874 3.138792
kidslt6 | -342.5048 100.0059 -3.42 0.001 -539.078 -145.9317
kidsge6 | -115.0205 30.82925 -3.73 0.000 -175.619 -54.42208
nwifeinc | -4.245807 3.655815 -1.16 0.246 -11.43173 2.940117
_cons | 2114.697 340.1307 6.22 0.000 1446.131 2783.263
------------------------------------------------------------------------------
. ivregress 2sls hours (lwage = exper expersq) educ age kidslt6 kidsge6 nwifeinc
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(6) = 20.80
Prob > chi2 = 0.0020
R-squared = .
Root MSE = 1291.2
------------------------------------------------------------------------------
hours | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lwage | 1544.818 476.7912 3.24 0.001 610.3248 2479.312
educ | -177.449 57.66517 -3.08 0.002 -290.4706 -64.42731
age | -10.78409 9.498705 -1.14 0.256 -29.40121 7.833032
kidslt6 | -210.8339 175.4811 -1.20 0.230 -554.7705 133.1028
kidsge6 | -47.55707 56.45049 -0.84 0.400 -158.198 63.08385
nwifeinc | -9.24912 6.427897 -1.44 0.150 -21.84757 3.349328
_cons | 2432.198 589.293 4.13 0.000 1277.205 3587.191
------------------------------------------------------------------------------
Instrumented: lwage
Instruments: educ age kidslt6 kidsge6 nwifeinc exper expersq
. predict u, r
(325 missing values generated)
. reg u educ age kidslt6 kidsge6 nwifeinc exper expersq
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(7, 420) = 0.12
Model | 1430782.97 7 204397.567 Prob > F = 0.9969
Residual | 712152488 420 1695601.16 R-squared = 0.0020
-------------+---------------------------------- Adj R-squared = -0.0146
Total | 713583271 427 1671155.2 Root MSE = 1302.2
------------------------------------------------------------------------------
u | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .3573408 29.48776 0.01 0.990 -57.60464 58.31932
age | -3.441065 10.57543 -0.33 0.745 -24.22843 17.3463
kidslt6 | -8.574062 173.0567 -0.05 0.961 -348.7392 331.5911
kidsge6 | 2.453998 54.47557 0.05 0.964 -104.6247 109.5327
nwifeinc | .8964355 6.483562 0.14 0.890 -11.84784 13.64071
exper | -15.88408 26.11816 -0.61 0.543 -67.22268 35.45452
expersq | .6408396 .7847342 0.82 0.415 -.9016561 2.183335
_cons | 177.4856 621.6837 0.29 0.775 -1044.514 1399.485
------------------------------------------------------------------------------
. display "Rsquare = " e(r2) ", Test statistic = " e(N)* e(r2) " & p = " chi2tail(1, e(r2)*e(N))
Rsquare = .00200507, Test statistic = .85816909 & p = .35425157
. reg lwage educ age kidslt6 kidsge6 nwifeinc exper expersq
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(7, 420) = 11.78
Model | 36.6476854 7 5.23538363 Prob > F = 0.0000
Residual | 186.679766 420 .444475633 R-squared = 0.1641
-------------+---------------------------------- Adj R-squared = 0.1502
Total | 223.327451 427 .523015108 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 | -.0558726 .0886034 -0.63 0.529 -.230034 .1182889
kidsge6 | -.0176485 .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 | -.3579973 .3182963 -1.12 0.261 -.9836496 .267655
------------------------------------------------------------------------------
. 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
. ivreg lwage (hours=age kidslt6 kidsge6 nwifeinc) educ exper*
Instrumental variables (2SLS) regression
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(4, 423) = 18.80
Model | 24.8336451 4 6.20841129 Prob > F = 0.0000
Residual | 198.493806 423 .469252497 R-squared = 0.1112
-------------+---------------------------------- Adj R-squared = 0.1028
Total | 223.327451 427 .523015108 Root MSE = .68502
------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hours | .0001608 .0002154 0.75 0.456 -.0002626 .0005842
educ | .1111175 .0153319 7.25 0.000 .0809814 .1412537
exper | .032646 .018061 1.81 0.071 -.0028545 .0681465
expersq | -.0006765 .0004426 -1.53 0.127 -.0015466 .0001935
_cons | -.6927902 .3066002 -2.26 0.024 -1.29544 -.0901405
------------------------------------------------------------------------------
Instrumented: hours
Instruments: educ exper expersq age kidslt6 kidsge6 nwifeinc
------------------------------------------------------------------------------
. // Example 9.6 (Nonlinear Labor Supply Function):
. bcuse mroz, clear nodesc
. foreach x of var lwage educ age nwifeinc {
2. g `x'sq=`x'^2
3. }
(325 missing values generated)
. ivreg hours (lwage lwagesq = exper expersq educsq agesq nwifeincsq) educ age kidslt6 kidsge6 nwifeinc
Instrumental variables (2SLS) regression
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(7, 420) = 3.54
Model | -308860249 7 -44122892.8 Prob > F = 0.0010
Residual | 566171269 420 1348026.83 R-squared = .
-------------+---------------------------------- Adj R-squared = .
Total | 257311020 427 602601.92 Root MSE = 1161
------------------------------------------------------------------------------
hours | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lwage | 1873.62 635.9912 2.95 0.003 623.498 3123.743
lwagesq | -437.291 350.0765 -1.25 0.212 -1125.411 250.8293
educ | -87.85113 66.39337 -1.32 0.186 -218.3558 42.65357
age | -9.142302 8.57342 -1.07 0.287 -25.99446 7.709855
kidslt6 | -185.0553 162.2808 -1.14 0.255 -504.039 133.9283
kidsge6 | -58.18948 50.1046 -1.16 0.246 -156.6765 40.29754
nwifeinc | -7.233422 5.805744 -1.25 0.213 -18.64536 4.178512
_cons | 1657.926 777.2758 2.13 0.034 130.0905 3185.761
------------------------------------------------------------------------------
Instrumented: lwage lwagesq
Instruments: educ age kidslt6 kidsge6 nwifeinc exper expersq educsq agesq
nwifeincsq
------------------------------------------------------------------------------
. predict u6, r
(325 missing values generated)
. reg u6 educ age kidslt6 kidsge6 nwifeinc exper expersq educsq agesq nwifeincsq
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(10, 417) = 0.26
Model | 3455380 10 345538 Prob > F = 0.9897
Residual | 562715880 417 1349438.56 R-squared = 0.0061
-------------+---------------------------------- Adj R-squared = -0.0177
Total | 566171260 427 1325928.01 Root MSE = 1161.7
------------------------------------------------------------------------------
u6 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | 128.0985 184.0341 0.70 0.487 -233.6516 489.8487
age | 22.79413 87.72426 0.26 0.795 -149.6428 195.231
kidslt6 | 7.451197 156.7426 0.05 0.962 -300.6529 315.5553
kidsge6 | -1.182785 50.09191 -0.02 0.981 -99.6469 97.28133
nwifeinc | 5.764532 14.08098 0.41 0.682 -21.91402 33.44309
exper | -20.36932 24.30678 -0.84 0.403 -68.14842 27.40978
expersq | .8696309 .7385333 1.18 0.240 -.5820812 2.321343
educsq | -5.028233 7.113492 -0.71 0.480 -19.011 8.954539
agesq | -.323187 1.02805 -0.31 0.753 -2.343992 1.697618
nwifeincsq | -.0699239 .2071181 -0.34 0.736 -.4770496 .3372019
_cons | -1172.042 2162.256 -0.54 0.588 -5422.322 3078.238
------------------------------------------------------------------------------
. display "Rsquare = " e(r2) ", Test statistic = " e(N)* e(r2) " & p = " chi2tail(3, e(r2)*e(N))
Rsquare = .00610306, Test statistic = 2.6121118 & p = .45537014
. log close
name: SN
log: myReplications\iiexample9
log type: smcl
closed on: 11 Jun 2019, 11:27:58
-----------------------------------------------------------------------------------------------
Leave a Reply
Want to join the discussion?Feel free to contribute!