You are on page 1of 5

IV & 2SLS Methods Lecture 10

Stata Output
.
.
.
.
.
.
.
.
.

*
* Do file for IV/2SLS lecture.
*
clear
use Mroz.dta
*
* IV
*
reg lwage educ

Source |
SS
df
MS
-------------+-----------------------------Model | 26.3264237
1 26.3264237
Residual | 197.001028
426 .462443727
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 1,
426)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
56.93
0.0000
0.1179
0.1158
.68003

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------educ |
.1086487
.0143998
7.55
0.000
.0803451
.1369523
_cons | -.1851969
.1852259
-1.00
0.318
-.5492674
.1788735
-----------------------------------------------------------------------------. ivreg lwage (educ=fatheduc)
Instrumental variables (2SLS) regression
Source |
SS
df
MS
-------------+-----------------------------Model | 20.8673618
1 20.8673618
Residual | 202.460089
426 .475258426
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 1,
426)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
2.84
0.0929
0.0934
0.0913
.68939

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------educ |
.0591735
.0351418
1.68
0.093
-.0098994
.1282463
_cons |
.4411035
.4461018
0.99
0.323
-.4357311
1.317938
-----------------------------------------------------------------------------Instrumented: educ
Instruments:
fatheduc
-----------------------------------------------------------------------------.
.
.
.

*
* 2SLS
*
regress lwage educ exper expersq

Source |
SS
df
MS
-------------+-----------------------------Model | 35.0223023
3 11.6741008
Residual | 188.305149
424 .444115917
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 3,
424)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
26.29
0.0000
0.1568
0.1509
.66642

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]

-------------+---------------------------------------------------------------educ |
.1074896
.0141465
7.60
0.000
.0796837
.1352956
exper |
.0415665
.0131752
3.15
0.002
.0156697
.0674633
expersq | -.0008112
.0003932
-2.06
0.040
-.0015841
-.0000382
_cons | -.5220407
.1986321
-2.63
0.009
-.9124668
-.1316145
-----------------------------------------------------------------------------. regress lwage educ exper expersq

(exper expersq motheduc fatheduc)

Instrumental variables (2SLS) regression


Source |
SS
df
MS
-------------+-----------------------------Model | 30.3074295
3 10.1024765
Residual | 193.020022
424
.4552359
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 3,
424)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
8.14
0.0000
0.1357
0.1296
.67471

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------educ |
.0613966
.0314367
1.95
0.051
-.0003945
.1231878
exper |
.0441704
.0134325
3.29
0.001
.0177679
.0705729
expersq |
-.000899
.0004017
-2.24
0.026
-.0016885
-.0001094
_cons |
.0481003
.4003281
0.12
0.904
-.7387745
.8349751
------------------------------------------------------------------------------

.
.
.
.
.

*
* Tests:
* (1) poor instruments:
*
reg educ exper expersq motheduc fatheduc

Source |
SS
df
MS
-------------+-----------------------------Model | 1025.94324
4
256.48581
Residual |
2884.0966
748 3.85574412
-------------+-----------------------------Total | 3910.03984
752 5.19952106

Number of obs
F( 4,
748)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

753
66.52
0.0000
0.2624
0.2584
1.9636

-----------------------------------------------------------------------------educ |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------exper |
.085378
.0255485
3.34
0.001
.0352228
.1355333
expersq | -.0018564
.0008276
-2.24
0.025
-.0034812
-.0002317
motheduc |
.1856173
.0259869
7.14
0.000
.1346014
.2366331
fatheduc |
.1845745
.0244979
7.53
0.000
.1364817
.2326674
_cons |
8.366716
.2667111
31.37
0.000
7.843125
8.890307
-----------------------------------------------------------------------------. test motheduc fatheduc
( 1)
( 2)

motheduc = 0
fatheduc = 0
F(

.
.
.
.

2,
748) =
Prob > F =

124.76
0.0000

*
* (2) over identifying restrictions:
*
regress lwage educ exper expersq (exper expersq motheduc fatheduc)

Instrumental variables (2SLS) regression


Source |
SS
df
MS
-------------+-----------------------------Model | 30.3074295
3 10.1024765
Residual | 193.020022
424
.4552359
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 3,
424)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
8.14
0.0000
0.1357
0.1296
.67471

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------educ |
.0613966
.0314367
1.95
0.051
-.0003945
.1231878
exper |
.0441704
.0134325
3.29
0.001
.0177679
.0705729
expersq |
-.000899
.0004017
-2.24
0.026
-.0016885
-.0001094
_cons |
.0481003
.4003281
0.12
0.904
-.7387745
.8349751
-----------------------------------------------------------------------------. predict u2SLS, resid
(325 missing values generated)
. regress u2SLS exper expersq motheduc fatheduc
Source |
SS
df
MS
-------------+-----------------------------Model | .170502982
4 .042625746
Residual | 192.849518
423 .455909026
-------------+------------------------------

Number of obs
F( 4,
423)
Prob > F
R-squared
Adj R-squared

=
428
=
0.09
= 0.9845
= 0.0009
= -0.0086

Total |

193.020021

427

.45203752

Root MSE

.67521

-----------------------------------------------------------------------------u2SLS |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------exper | -.0000183
.0133291
-0.00
0.999
-.0262179
.0261813
expersq |
7.34e-07
.0003985
0.00
0.999
-.0007825
.000784
motheduc | -.0066065
.0118864
-0.56
0.579
-.0299704
.0167573
fatheduc |
.0057823
.0111786
0.52
0.605
-.0161902
.0277547
_cons |
.0109641
.1412571
0.08
0.938
-.2666892
.2886173
-----------------------------------------------------------------------------. test motheduc fatheduc
( 1)
( 2)

motheduc = 0
fatheduc = 0
F(

2,
423) =
Prob > F =

0.19
0.8295

. * (3) Hausman test:


. *
. regress lwage educ exper expersq

(exper expersq motheduc fatheduc)

Instrumental variables (2SLS) regression


Source |
SS
df
MS
-------------+-----------------------------Model | 30.3074295
3 10.1024765
Residual | 193.020022
424
.4552359
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 3,
424)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
8.14
0.0000
0.1357
0.1296
.67471

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------educ |
.0613966
.0314367
1.95
0.051
-.0003945
.1231878
exper |
.0441704
.0134325
3.29
0.001
.0177679
.0705729
expersq |
-.000899
.0004017
-2.24
0.026
-.0016885
-.0001094
_cons |
.0481003
.4003281
0.12
0.904
-.7387745
.8349751
-----------------------------------------------------------------------------. hausman, save
. regress lwage educ exper expersq
Source |
SS
df
MS
-------------+-----------------------------Model | 35.0223023
3 11.6741008
Residual | 188.305149
424 .444115917
-------------+-----------------------------Total | 223.327451
427 .523015108

Number of obs
F( 3,
424)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

428
26.29
0.0000
0.1568
0.1509
.66642

-----------------------------------------------------------------------------lwage |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------educ |
.1074896
.0141465
7.60
0.000
.0796837
.1352956
exper |
.0415665
.0131752
3.15
0.002
.0156697
.0674633
expersq | -.0008112
.0003932
-2.06
0.040
-.0015841
-.0000382
_cons | -.5220407
.1986321
-2.63
0.009
-.9124668
-.1316145
-----------------------------------------------------------------------------. hausman
---- Coefficients ---|
(b)
(B)
(b-B)
sqrt(diag(V_b-V_B))
|
Consistent
Efficient
Difference
S.E.
-------------+---------------------------------------------------------------educ |
.0613966
.1074896
-.046093
.0280739
exper |
.0441704
.0415665
.0026039
.0026164
expersq |
-.000899
-.0008112
-.0000878
.0000819
-----------------------------------------------------------------------------b = consistent under Ho and Ha; obtained from regress
B = inconsistent under Ha, efficient under Ho; obtained from regress
Test:

Ho:

difference in coefficients not systematic


chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)
=
2.70
Prob>chi2 =
0.4410

You might also like