UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Stata Textbook Examples
Econometric Analysis of Cross Section and Panel Data by Jeffrey M. Wooldridge
Chapter 5: Instrumental Variables Estimation of Single-Equation Linear Models

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 5.3 on page 96 using mroz.dta.
use mroz, clear

reg educ exper expersq motheduc fatheduc huseduc if lwage ~=.

      Source |       SS       df       MS              Number of obs =     428
-------------+------------------------------           F(  5,   422) =   63.30
       Model |  955.830608     5  191.166122           Prob > F      =  0.0000
    Residual |  1274.36565   422  3.01982382           R-squared     =  0.4286
-------------+------------------------------           Adj R-squared =  0.4218
       Total |  2230.19626   427  5.22294206           Root MSE      =  1.7378

------------------------------------------------------------------------------
        educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       exper |   .0374977   .0343102     1.09   0.275    -.0299424    .1049379
     expersq |  -.0006002   .0010261    -0.58   0.559    -.0026171    .0014167
    motheduc |   .1141532   .0307835     3.71   0.000     .0536452    .1746613
    fatheduc |   .1060801   .0295153     3.59   0.000     .0480648    .1640955
     huseduc |   .3752548   .0296347    12.66   0.000     .3170049    .4335048
       _cons |   5.538311   .4597824    12.05   0.000     4.634562     6.44206
------------------------------------------------------------------------------

test motheduc fatheduc huseduc

 ( 1)  motheduc = 0
 ( 2)  fatheduc = 0
 ( 3)  huseduc = 0

       F(  3,   422) =  104.29
            Prob > F =    0.0000
            
ivreg lwage exper expersq (educ=fatheduc huseduc motheduc )

Instrumental variables (2SLS) regression

      Source |       SS       df       MS              Number of obs =     428
-------------+------------------------------           F(  3,   424) =   11.52
       Model |  33.3927368     3  11.1309123           Prob > F      =  0.0000
    Residual |  189.934704   424  .447959208           R-squared     =  0.1495
-------------+------------------------------           Adj R-squared =  0.1435
       Total |  223.327441   427  .523015084           Root MSE      =   .6693

------------------------------------------------------------------------------
       lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        educ |   .0803918    .021774     3.69   0.000     .0375934    .1231901
       exper |   .0430973   .0132649     3.25   0.001     .0170242    .0691704
     expersq |  -.0008628   .0003962    -2.18   0.030    -.0016415   -.0000841
       _cons |  -.1868572   .2853959    -0.65   0.513    -.7478241    .3741097
------------------------------------------------------------------------------
Instrumented:  educ
Instruments:   exper expersq fatheduc huseduc motheduc
------------------------------------------------------------------------------

reg lwage exper expersq educ

      Source |       SS       df       MS              Number of obs =     428
-------------+------------------------------           F(  3,   424) =   26.29
       Model |  35.0222967     3  11.6740989           Prob > F      =  0.0000
    Residual |  188.305144   424  .444115906           R-squared     =  0.1568
-------------+------------------------------           Adj R-squared =  0.1509
       Total |  223.327441   427  .523015084           Root MSE      =  .66642

------------------------------------------------------------------------------
       lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       exper |   .0415665   .0131752     3.15   0.002     .0156697    .0674633
     expersq |  -.0008112   .0003932    -2.06   0.040    -.0015841   -.0000382
        educ |   .1074896   .0141465     7.60   0.000     .0796837    .1352956
       _cons |  -.5220406   .1986321    -2.63   0.009    -.9124667   -.1316144
------------------------------------------------------------------------------
Example 5.4 on page 99.
ivreg lwage exper expersq kidslt6 kidsge6 (educ=fatheduc huseduc motheduc kidslt6 kidsge6)

Instrumental variables (2SLS) regression

      Source |       SS       df       MS              Number of obs =     428
-------------+------------------------------           F(  5,   422) =    7.08
       Model |  33.6045837     5  6.72091675           Prob > F      =  0.0000
    Residual |  189.722857   422   .44958023           R-squared     =  0.1505
-------------+------------------------------           Adj R-squared =  0.1404
       Total |  223.327441   427  .523015084           Root MSE      =  .67051

------------------------------------------------------------------------------
       lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        educ |   .0798678   .0223575     3.57   0.000      .035922    .1238136
       exper |   .0414939   .0134453     3.09   0.002     .0150658    .0679221
     expersq |  -.0008576   .0003972    -2.16   0.031    -.0016384   -.0000768
     kidslt6 |  -.0313332   .0861049    -0.36   0.716    -.2005811    .1379146
     kidsge6 |  -.0182224   .0271427    -0.67   0.502    -.0715741    .0351292
       _cons |  -.1315325   .3038534    -0.43   0.665    -.7287871    .4657222
------------------------------------------------------------------------------
Instrumented:  educ
Instruments:   exper expersq kidslt6 kidsge6 fatheduc huseduc motheduc
------------------------------------------------------------------------------

test kidslt6 kidsge6

 ( 1)  kidslt6 = 0
 ( 2)  kidsge6 = 0

       F(  2,   422) =    0.31
            Prob > F =    0.7368
Example 5.5 on page 106 using nls80.dta.
use nls80, clear

ivreg lwage  exper tenure married south urban black educ (iq = kww )

Instrumental variables (2SLS) regression

      Source |       SS       df       MS              Number of obs =     935
-------------+------------------------------           F(  8,   926) =   36.96
       Model |  31.4665121     8  3.93331401           Prob > F      =  0.0000
    Residual |  134.189771   926   .14491336           R-squared     =  0.1900
-------------+------------------------------           Adj R-squared =  0.1830
       Total |  165.656283   934  .177362188           Root MSE      =  .38067

------------------------------------------------------------------------------
       lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          iq |   .0130473   .0049341     2.64   0.008     .0033641    .0227305
       exper |     .01442   .0033208     4.34   0.000     .0079029    .0209371
      tenure |   .0104562   .0026012     4.02   0.000     .0053512    .0155612
     married |   .2006903   .0406775     4.93   0.000     .1208595    .2805211
       south |  -.0515532   .0311279    -1.66   0.098    -.1126426    .0095361
       urban |   .1767058   .0282117     6.26   0.000     .1213394    .2320722
       black |  -.0225612   .0739597    -0.31   0.760    -.1677093    .1225869
        educ |   .0250321   .0166068     1.51   0.132    -.0075591    .0576234
       _cons |   4.592453   .3257807    14.10   0.000     3.953099    5.231807
------------------------------------------------------------------------------
Instrumented:  iq
Instruments:   exper tenure married south urban black educ kww
------------------------------------------------------------------------------

How to cite this page

Report an error on this page

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


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California