Skip to Main Content

Methods Matter: Improving causal Inference in Educational and Social Science Research by Richard J. Murnane and John B. Willett Chapter 10: Introducing Instrumental-Variables Estimation | Stata Textbook Examples

use https://stats.idre.ucla.edu/stat/stata/examples/methods_matter/chapter10/dee, clear 

(a) Univariate Statistics from Table 10.1 on page 207.

summarize register college, detail

         Is respondent currently registered to vote?
-------------------------------------------------------------
      Percentiles      Smallest
 1%            0              0
 5%            0              0
10%            0              0       Obs                9227
25%            0              0       Sum of Wgt.        9227

50%            1                      Mean           .6708573
                        Largest       Std. Dev.      .4699274
75%            1              1
90%            1              1       Variance       .2208317
95%            1              1       Skewness       -.727204
99%            1              1       Kurtosis       1.528826

       Attended junior, community or 4year college by
                            1984?
-------------------------------------------------------------
      Percentiles      Smallest
 1%            0              0
 5%            0              0
10%            0              0       Obs                9227
25%            0              0       Sum of Wgt.        9227

50%            1                      Mean           .5470901
                        Largest       Std. Dev.      .4978046
75%            1              1
90%            1              1       Variance       .2478094
95%            1              1       Skewness      -.1892012
99%            1              1       Kurtosis       1.035797
	

Test whether the means of register and college are significantly different from zero.
Note: this output does not appear in the table.

ttest register == 0

One-sample t test
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
register |    9227    .6708573    .0048922    .4699274    .6612676     .680447
------------------------------------------------------------------------------
    mean = mean(register)                                         t = 137.1291
Ho: mean = 0                                     degrees of freedom =     9226

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

ttest college == 0

One-sample t test
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
 college |    9227    .5470901    .0051824    .4978046    .5369315    .5572487
------------------------------------------------------------------------------
    mean = mean(college)                                          t = 105.5675
Ho: mean = 0                                     degrees of freedom =     9226

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
 	

Cross-tabulation of register and college, with
a chi-squared test. (Not shown in the text.)

tabulate register college, cchi2 chi2 expected 

+--------------------+
| Key                |
|--------------------|
|     frequency      |
| expected frequency |
| chi2 contribution  |
+--------------------+

        Is |
respondent |   Attended junior,
 currently |  community or 4year
registered |   college by 1984?
  to vote? |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,780      1,257 |     3,037 
           |   1,375.5    1,661.5 |   3,037.0 
           |     119.0       98.5 |     217.4 
-----------+----------------------+----------
         1 |     2,399      3,791 |     6,190 
           |   2,803.5    3,386.5 |   6,190.0 
           |      58.4       48.3 |     106.7 
-----------+----------------------+----------
     Total |     4,179      5,048 |     9,227 
           |   4,179.0    5,048.0 |   9,227.0 
           |     177.3      146.8 |     324.1 
           	

(b) Sample Bivariate Correlations and Covariances from Table 10.1 on page 207.

pwcorr register college, sig

             | register  college
-------------+------------------
    register |   1.0000 
             |
             |
     college |   0.1874   1.0000 
             |   0.0000
             |

correlate register college, covariance
(obs=9227)

             | register  college
-------------+------------------
    register |  .220832
     college |  .043845  .247809
     

(c) OLS Regression Analysis: Outcome=register from Table 10.1 on page 207.

regress register college

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  1,  9225) =  335.86
       Model |  71.5702829     1  71.5702829           Prob > F      =  0.0000
    Residual |  1965.82324  9225   .21309737           R-squared     =  0.0351
-------------+------------------------------           Adj R-squared =  0.0350
       Total |  2037.39352  9226  .220831728           Root MSE      =  .46162

------------------------------------------------------------------------------
    register |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     college |   .1769297   .0096544    18.33   0.000      .158005    .1958544
       _cons |   .5740608   .0071409    80.39   0.000      .560063    .5880585
------------------------------------------------------------------------------
	

(a) Univariate Statistics from Table 10.2 on page 219. Note that only the variable distance has
been added from panel a of Table 10.1.

summarize distance, detail

      Miles from respondents HS to nearest 2yr college
-------------------------------------------------------------
      Percentiles      Smallest
 1%            0              0
 5%            1              0
10%            1              0       Obs                9227
25%            3              0       Sum of Wgt.        9227

50%            7                      Mean           9.735992
                        Largest       Std. Dev.      8.702286
75%           15             35
90%           25             35       Variance       75.72978
95%           30             35       Skewness       1.181081
99%           35             35       Kurtosis       3.599886
	

Test that the mean of distance is significantly different from zero. (Not shown in the
table.)

ttest distance == 0

One-sample t test
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
distance |    9227    9.735992    .0905948    8.702286    9.558407    9.913578
------------------------------------------------------------------------------
    mean = mean(distance)                                         t = 107.4675
Ho: mean = 0                                     degrees of freedom =     9226

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
 	

(b) Sample Bivariate Correlations and Covariances from Table 10.2 on page 219.

pwcorr register college distance, sig

             | register  college distance
-------------+---------------------------
    register |   1.0000 
             |
             |
     college |   0.1874   1.0000 
             |   0.0000
             |
    distance |  -0.0335  -0.1114   1.0000 
             |   0.0013   0.0000
             |

correlate register college distance, covariance
(obs=9227)

             | register  college distance
-------------+---------------------------
    register |  .220832
     college |  .043845  .247809
    distance | -.136873 -.482472  75.7298
    

(c) Method-of-Moments IVE Estimate from Table 10.2 on page 219.

display -.136873/-.482472
.28369107

Table 10.3 on page 228.

ivreg register (college=distance), first

First-stage regressions
-----------------------

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  1,  9225) =  115.86
       Model |  28.3590322     1  28.3590322           Prob > F      =  0.0000
    Residual |  2257.93034  9225  .244762096           R-squared     =  0.0124
-------------+------------------------------           Adj R-squared =  0.0123
       Total |  2286.28937  9226  .247809383           Root MSE      =  .49473

------------------------------------------------------------------------------
     college |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    distance |   -.006371   .0005919   -10.76   0.000    -.0075312   -.0052108
       _cons |   .6091178   .0077287    78.81   0.000     .5939678    .6242678
------------------------------------------------------------------------------


Instrumental variables (2SLS) regression

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  1,  9225) =   10.57
       Model |  45.5110902     1  45.5110902           Prob > F      =  0.0012
    Residual |  1991.88243  9225  .215922215           R-squared     =  0.0223
-------------+------------------------------           Adj R-squared =  0.0222
       Total |  2037.39352  9226  .220831728           Root MSE      =  .46467

------------------------------------------------------------------------------
    register |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     college |   .2836913   .0872575     3.25   0.001     .1126472    .4547353
       _cons |   .5156526   .0479822    10.75   0.000     .4215969    .6097083
------------------------------------------------------------------------------
Instrumented:  college
Instruments:   distance
------------------------------------------------------------------------------
	

Table 10.4 on page 235.

reg3 (register=college) (college=distance), corr(u)

Three-stage least-squares regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
register         9227      1    .4646239    0.0223      10.57   0.0011
college          9227      1    .4946807    0.0124     115.89   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
register     |
     college |   .2836913   .0872481     3.25   0.001     .1126882    .4546944
       _cons |   .5156526    .047977    10.75   0.000     .4216194    .6096858
-------------+----------------------------------------------------------------
college      |
    distance |   -.006371   .0005918   -10.77   0.000    -.0075309    -.005211
       _cons |   .6091178   .0077279    78.82   0.000     .5939714    .6242642
------------------------------------------------------------------------------
Endogenous variables:  register college 
Exogenous variables:   distance 
------------------------------------------------------------------------------
	

To estimate the error covariances, the following can be used immediately after the above
command.

* display matrix of error variances and covariances.
matrix list e(Sigma)

symmetric e(Sigma)[2,2]
            register     college
register   .21587541
 college  -.02645365   .24470904

* calculate the correlation based on variances and covariances.
display -.02645365/(sqrt(.21587541)*sqrt(.24470904))
-.11509568
	

Table 10.5 on page 240.

ivreg register black hispanic otherrace (college=distance), first

First-stage regressions
-----------------------

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  4,  9222) =   51.24
       Model |  49.7051638     4   12.426291           Prob > F      =  0.0000
    Residual |   2236.5842  9222  .242527023           R-squared     =  0.0217
-------------+------------------------------           Adj R-squared =  0.0213
       Total |  2286.28937  9226  .247809383           Root MSE      =  .49247

------------------------------------------------------------------------------
     college |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       black |   -.057663    .015959    -3.61   0.000    -.0889461   -.0263799
    hispanic |   -.116213   .0132567    -8.77   0.000    -.1421991   -.0902269
   otherrace |   .0337076   .0240104     1.40   0.160    -.0133582    .0807734
    distance |  -.0069203   .0005947   -11.64   0.000    -.0080861   -.0057545
       _cons |    .643146   .0090535    71.04   0.000     .6253992    .6608929
------------------------------------------------------------------------------


Instrumental variables (2SLS) regression

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  4,  9222) =   10.85
       Model |  70.1890588     4  17.5472647           Prob > F      =  0.0000
    Residual |  1967.20446  9222  .213316467           R-squared     =  0.0345
-------------+------------------------------           Adj R-squared =  0.0340
       Total |  2037.39352  9226  .220831728           Root MSE      =  .46186

------------------------------------------------------------------------------
    register |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     college |   .2488616   .0806009     3.09   0.002     .0908659    .4068572
       black |    .061733   .0151736     4.07   0.000     .0319895    .0914766
    hispanic |   .0282926   .0148321     1.91   0.056    -.0007816    .0573669
   otherrace |  -.1066661   .0228193    -4.67   0.000     -.151397   -.0619352
       _cons |      .5266   .0463065    11.37   0.000      .435829    .6173709
------------------------------------------------------------------------------
Instrumented:  college
Instruments:   black hispanic otherrace distance
------------------------------------------------------------------------------
	

The analyses in Tables 10.6 and 10.7 include a variable that is restricted,
so these analyses cannot be reproduced using the available dataset.

Table 10.8 from page 249. Note that many of the coefficients in the first stage models
are equal to 0.

* Form interaction terms:
gen distxblack  = distance*black
gen distxhispanic   = distance*hispanic
gen distxotherrace = distance*otherrace

* Form interactions between instruments and exog race variables as instruments:
gen collegexblack  = college*black
gen collegexhispanic   = college*hispanic
gen collegexotherrace = college*otherrace

ivreg register black hispanic otherrace ///
    (college collegexblack collegexhispanic collegexotherrace = ///
    distance distxblack distxhispanic distxotherrace), first

First-stage regressions
-----------------------

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  7,  9219) =   29.57
       Model |  50.2079509     7  7.17256442           Prob > F      =  0.0000
    Residual |  2236.08142  9219  .242551407           R-squared     =  0.0220
-------------+------------------------------           Adj R-squared =  0.0212
       Total |  2286.28937  9226  .247809383           Root MSE      =   .4925

------------------------------------------------------------------------------
     college |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       black |  -.0650566   .0227625    -2.86   0.004    -.1096761   -.0204372
    hispanic |    -.12759   .0193679    -6.59   0.000    -.1655553   -.0896247
   otherrace |   .0589545   .0350741     1.68   0.093    -.0097986    .1277075
    distance |  -.0071118   .0007235    -9.83   0.000      -.00853   -.0056937
  distxblack |     .00089   .0020121     0.44   0.658    -.0030542    .0048342
distxhispa~c |   .0012905   .0015768     0.82   0.413    -.0018003    .0043814
distxother~e |   -.002994   .0029407    -1.02   0.309    -.0087584    .0027703
       _cons |   .6451829   .0100579    64.15   0.000     .6254673    .6648985
------------------------------------------------------------------------------

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  7,  9219) = 1336.08
       Model |  289.504372     7  41.3577675           Prob > F      =  0.0000
    Residual |  285.371102  9219   .03095467           R-squared     =  0.5036
-------------+------------------------------           Adj R-squared =  0.5032
       Total |  574.875474  9226   .06231037           Root MSE      =  .17594

------------------------------------------------------------------------------
collegexbl~k |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       black |   .5801263   .0081317    71.34   0.000     .5641864    .5960661
    hispanic |   1.71e-14    .006919     0.00   1.000    -.0135628    .0135628
   otherrace |   5.19e-15   .0125299     0.00   1.000    -.0245614    .0245614
    distance |   6.15e-16   .0002585     0.00   1.000    -.0005066    .0005066
  distxblack |  -.0062218   .0007188    -8.66   0.000    -.0076308   -.0048128
distxhispa~c |  -1.53e-15   .0005633    -0.00   1.000    -.0011042    .0011042
distxother~e |  -1.46e-15   .0010505    -0.00   1.000    -.0020593    .0020593
       _cons |  -3.37e-15   .0035931    -0.00   1.000    -.0070432    .0070432
------------------------------------------------------------------------------

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  7,  9219) =  949.38
       Model |  326.332652     7  46.6189502           Prob > F      =  0.0000
    Residual |  452.697586  9219  .049104847           R-squared     =  0.4189
-------------+------------------------------           Adj R-squared =  0.4185
       Total |  779.030237  9226  .084438569           Root MSE      =   .2216

------------------------------------------------------------------------------
collegexhi~c |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       black |  -2.90e-14   .0102419    -0.00   1.000    -.0200763    .0200763
    hispanic |   .5175929   .0087145    59.39   0.000     .5005106    .5346753
   otherrace |  -6.01e-14   .0157815    -0.00   1.000    -.0309352    .0309352
    distance |  -2.64e-15   .0003255    -0.00   1.000    -.0006381    .0006381
  distxblack |   8.00e-16   .0009053     0.00   1.000    -.0017747    .0017747
distxhispa~c |  -.0058213   .0007095    -8.21   0.000     -.007212   -.0044306
distxother~e |   2.39e-15   .0013231     0.00   1.000    -.0025936    .0025936
       _cons |   5.13e-14   .0045255     0.00   1.000     -.008871     .008871
------------------------------------------------------------------------------

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  7,  9219) = 2119.51
       Model |  168.032181     7  24.0045973           Prob > F      =  0.0000
    Residual |  104.410216  9219  .011325547           R-squared     =  0.6168
-------------+------------------------------           Adj R-squared =  0.6165
       Total |  272.442397  9226   .02952985           Root MSE      =  .10642

------------------------------------------------------------------------------
collegexot~e |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       black |   1.30e-14   .0049187     0.00   1.000    -.0096417    .0096417
    hispanic |  -2.71e-15   .0041851    -0.00   1.000    -.0082038    .0082038
   otherrace |   .7041374    .007579    92.91   0.000     .6892808     .718994
    distance |   1.09e-16   .0001563     0.00   1.000    -.0003064    .0003064
  distxblack |  -1.31e-15   .0004348    -0.00   1.000    -.0008523    .0008523
distxhispa~c |   1.51e-17   .0003407     0.00   1.000    -.0006679    .0006679
distxother~e |  -.0101059   .0006354   -15.90   0.000    -.0113515   -.0088603
       _cons |   1.18e-15   .0021734     0.00   1.000    -.0042603    .0042603
------------------------------------------------------------------------------


Instrumental variables (2SLS) regression

      Source |       SS       df       MS              Number of obs =    9227
-------------+------------------------------           F(  7,  9219) =    6.74
       Model |  25.5540837     7  3.65058339           Prob > F      =  0.0000
    Residual |  2011.83944  9219  .218227512           R-squared     =  0.0125
-------------+------------------------------           Adj R-squared =  0.0118
       Total |  2037.39352  9226  .220831728           Root MSE      =  .46715

------------------------------------------------------------------------------
    register |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     college |   .3586927   .0964921     3.72   0.000     .1695469    .5478385
collegexbl~k |   -.398586   .3020666    -1.32   0.187    -.9907034    .1935314
collegexhi~c |  -.2929071    .247842    -1.18   0.237    -.7787322     .192918
collegexot~e |  -.4633532   .2843963    -1.63   0.103    -1.020833    .0941266
       black |   .2780238   .1627012     1.71   0.088    -.0409066    .5969541
    hispanic |   .1765485    .120819     1.46   0.144    -.0602835    .4133804
   otherrace |   .1742172   .1755997     0.99   0.321     -.169997    .5184314
       _cons |   .4640456   .0552995     8.39   0.000     .3556464    .5724449
------------------------------------------------------------------------------
Instrumented:  college collegexblack collegexhispanic collegexotherrace
Instruments:   black hispanic otherrace distance distxblack distxhispanic
               distxotherrace
------------------------------------------------------------------------------
	

Reproduce the analysis shown above (Table 10.8 page 249) using simultaneous equations.
Note that the results are identical. (Not shown in the text.)

reg3 (register = college collegexblack collegexhispanic collegexotherrace black hispanic otherrace) ///
          (college = distance black hispanic otherrace distxblack distxhispanic distxotherrace) ///
          (collegexblack = distance black hispanic otherrace distxblack distxhispanic distxotherrace) ///
          (collegexhispanic = distance black hispanic otherrace distxblack distxhispanic distxotherrace) ///
          (collegexotherrace = distance black hispanic otherrace distxblack distxhispanic distxotherrace), corr(u)

Three-stage least-squares regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
register         9227      7    .4669457    0.0125      47.24   0.0000
college          9227      7    .4922815    0.0220     207.18   0.0000
collegexbl~k     9227      7    .1758631    0.5036    9360.64   0.0000
collegexhi~c     9227      7    .2215001    0.4189    6651.40   0.0000
collegexot~e     9227      7    .1063754    0.6168   14849.44   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
register     |
     college |   .3586927   .0964502     3.72   0.000     .1696537    .5477316
collegexbl~k |   -.398586   .3019356    -1.32   0.187     -.990369     .193197
collegexhi~c |  -.2929071   .2477345    -1.18   0.237    -.7784578    .1926436
collegexot~e |  -.4633532    .284273    -1.63   0.103    -1.020518    .0938117
       black |   .2780238   .1626307     1.71   0.087    -.0407265     .596774
    hispanic |   .1765485   .1207666     1.46   0.144    -.0601497    .4132467
   otherrace |   .1742172   .1755235     0.99   0.321    -.1698025     .518237
       _cons |   .4640456   .0552755     8.40   0.000     .3557076    .5723837
-------------+----------------------------------------------------------------
college      |
    distance |  -.0071118   .0007232    -9.83   0.000    -.0085292   -.0056945
       black |  -.0650566   .0227526    -2.86   0.004    -.1096509   -.0204624
    hispanic |    -.12759   .0193595    -6.59   0.000    -.1655338   -.0896461
   otherrace |   .0589545   .0350589     1.68   0.093    -.0097597    .1276687
  distxblack |     .00089   .0020113     0.44   0.658     -.003052     .004832
distxhispa~c |   .0012905   .0015761     0.82   0.413    -.0017986    .0043797
distxother~e |   -.002994   .0029394    -1.02   0.308    -.0087551    .0027671
       _cons |   .6451829   .0100535    64.17   0.000     .6254784    .6648874
-------------+----------------------------------------------------------------
collegexbl~k |
    distance |   1.96e-16   .0002583     0.00   1.000    -.0005063    .0005063
       black |   .5801263   .0081282    71.37   0.000     .5641954    .5960571
    hispanic |   1.03e-14    .006916     0.00   1.000    -.0135551    .0135551
   otherrace |   5.62e-15   .0125245     0.00   1.000    -.0245475    .0245475
  distxblack |  -.0062218   .0007185    -8.66   0.000      -.00763   -.0048136
distxhispa~c |  -1.17e-15   .0005631    -0.00   1.000    -.0011036    .0011036
distxother~e |  -6.23e-16   .0010501    -0.00   1.000    -.0020581    .0020581
       _cons |  -2.26e-15   .0035915    -0.00   1.000    -.0070393    .0070393
-------------+----------------------------------------------------------------
collegexhi~c |
    distance |   2.05e-16   .0003254     0.00   1.000    -.0006377    .0006377
       black |   3.62e-15   .0102374     0.00   1.000     -.020065     .020065
    hispanic |   .5175929   .0087107    59.42   0.000     .5005203    .5346656
   otherrace |   5.26e-15   .0157746     0.00   1.000    -.0309177    .0309177
  distxblack |  -4.21e-16    .000905    -0.00   1.000    -.0017737    .0017737
distxhispa~c |  -.0058213   .0007092    -8.21   0.000    -.0072112   -.0044314
distxother~e |  -5.68e-16   .0013226    -0.00   1.000    -.0025922    .0025922
       _cons |  -1.90e-15   .0045235    -0.00   1.000     -.008866     .008866
-------------+----------------------------------------------------------------
collegexot~e |
    distance |   7.94e-17   .0001563     0.00   1.000    -.0003063    .0003063
       black |   1.33e-15   .0049165     0.00   1.000    -.0096362    .0096362
    hispanic |   3.75e-15   .0041833     0.00   1.000    -.0081992    .0081992
   otherrace |   .7041374   .0075758    92.95   0.000     .6892892    .7189856
  distxblack |  -1.57e-16   .0004346    -0.00   1.000    -.0008518    .0008518
distxhispa~c |  -4.19e-16   .0003406    -0.00   1.000    -.0006675    .0006675
distxother~e |  -.0101059   .0006352   -15.91   0.000    -.0113507    -.008861
       _cons |  -7.91e-16   .0021724    -0.00   1.000    -.0042579    .0042579
------------------------------------------------------------------------------
Endogenous variables:  register college collegexblack collegexhispanic 
     collegexotherrace 
Exogenous variables:   black hispanic otherrace distance distxblack 
     distxhispanic distxotherrace 
------------------------------------------------------------------------------

matrix list e(Sigma)

symmetric e(Sigma)[5,5]
                  register       college  collegexbl~k  collegexhi~c  collegexot~e
    register      .2180383
     college    -.01156577     .24234111
collegexbl~k     .00601057     .03092783     .03092783
collegexhi~c     .00522595     .04906227     4.577e-34     .04906227
collegexot~e     .00217381     .01131573    -1.553e-33    -1.915e-33     .01131573
	

Reproduce last two analyses (Table 10.8 page 249) using simultaneous equations, dropping
the irrelevant terms. Note that the results are identical. (Not shown in the text.)

reg3 (register = college collegexblack collegexhispanic collegexotherrace black hispanic otherrace) ///
          (college = distance black hispanic otherrace distxblack distxhispanic distxotherrace) ///
          (collegexblack  = black distxblack) ///
          (collegexhispanic   = hispanic distxhispanic) ///
          (collegexotherrace = otherrace distxotherrace), corr(u)

Three-stage least-squares regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
register         9227      7    .4669457    0.0125      47.58   0.0000
college          9227      7    .4922815    0.0220     296.53   0.0000
collegexbl~k     9227      2    .1758631    0.5036    9360.64   0.0000
collegexhi~c     9227      2    .2215001    0.4189    6651.40   0.0000
collegexot~e     9227      2    .1063754    0.6168   14849.44   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
register     |
     college |   .3586927   .0959752     3.74   0.000     .1705847    .5468006
collegexbl~k |   -.398586   .3011776    -1.32   0.186    -.9888832    .1917112
collegexhi~c |  -.2929071   .2467839    -1.19   0.235    -.7765947    .1907805
collegexot~e |  -.4633532    .283115    -1.64   0.102    -1.018248     .091542
       black |   .2780238   .1622169     1.71   0.087    -.0399155    .5959631
    hispanic |   .1765485   .1202946     1.47   0.142    -.0592245    .4123215
   otherrace |   .1742172   .1748113     1.00   0.319    -.1684067    .5168411
       _cons |   .4640456   .0550057     8.44   0.000     .3562364    .5718549
-------------+----------------------------------------------------------------
college      |
    distance |  -.0071118   .0005709   -12.46   0.000    -.0082308   -.0059929
       black |  -.0650566   .0194843    -3.34   0.001    -.1032451   -.0268682
    hispanic |    -.12759    .017194    -7.42   0.000    -.1612895   -.0938904
   otherrace |   .0589545   .0286356     2.06   0.040     .0028297    .1150792
  distxblack |     .00089   .0017235     0.52   0.606     -.002488    .0042681
distxhispa~c |   .0012905   .0013947     0.93   0.355    -.0014431    .0040241
distxother~e |   -.002994   .0024008    -1.25   0.212    -.0076995    .0017114
       _cons |   .6451829   .0086459    74.62   0.000     .6282372    .6621286
-------------+----------------------------------------------------------------
collegexbl~k |
       black |   .5801263   .0075499    76.84   0.000     .5653288    .5949237
  distxblack |  -.0062218   .0006705    -9.28   0.000    -.0075359   -.0049077
       _cons |  -6.09e-18   .0019577    -0.00   1.000    -.0038369    .0038369
-------------+----------------------------------------------------------------
collegexhi~c |
    hispanic |   .5175929   .0078773    65.71   0.000     .5021538    .5330321
distxhispa~c |  -.0058213   .0006301    -9.24   0.000    -.0070563   -.0045863
       _cons |  -3.52e-17   .0025763    -0.00   1.000    -.0050494    .0050494
-------------+----------------------------------------------------------------
collegexot~e |
   otherrace |   .7041374   .0073459    95.85   0.000     .6897396    .7185351
distxother~e |  -.0101059   .0006156   -16.42   0.000    -.0113125   -.0088992
       _cons |  -2.26e-17   .0011358    -0.00   1.000    -.0022261    .0022261
------------------------------------------------------------------------------
Endogenous variables:  register college collegexblack collegexhispanic 
     collegexotherrace 
Exogenous variables:   black hispanic otherrace distance distxblack 
     distxhispanic distxotherrace 
------------------------------------------------------------------------------

matrix list e(Sigma)

symmetric e(Sigma)[5,5]
                  register       college  collegexbl~k  collegexhi~c  collegexot~e
    register      .2180383
     college    -.01156577     .24234111
collegexbl~k     .00601057     .03092783     .03092783
collegexhi~c     .00522595     .04906227             0     .04906227
collegexot~e     .00217381     .01131573             0             0     .01131573
	

A model similar to the last three (all of which replicate Table 10.8 page 249) estimated using
simultaneous equations, dropping
the irrelevant terms and non-significant variables from the model. Note that the results are very similar, but
not identical. (Not shown in the text.)

reg3 (register = college collegexblack collegexhispanic collegexotherrace black hisp otherrace) ///
          (college = distance black hispanic otherrace) ///
          (collegexblack = black distxblack) ///
          (collegexhispanic = hispanic distxhispanic) ///
          (collegexotherrace = otherrace distxotherrace), corr(u)

Three-stage least-squares regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
register         9227      7    .4673456    0.0109      47.78   0.0000
college          9227      4    .4923371    0.0217     293.54   0.0000
collegexbl~k     9227      2    .1758635    0.5036    9380.65   0.0000
collegexhi~c     9227      2    .2215025    0.4189    6684.76   0.0000
collegexot~e     9227      2    .1063761    0.6168   14856.35   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
register     |
     college |   .3618827     .09572     3.78   0.000      .174275    .5494905
collegexbl~k |  -.4143828   .2996661    -1.38   0.167    -1.001718     .172952
collegexhi~c |  -.3156465   .2454996    -1.29   0.199    -.7968169    .1655239
collegexot~e |  -.4230397   .2809778    -1.51   0.132    -.9737461    .1276667
       black |   .2865527   .1614041     1.78   0.076    -.0297935    .6028988
    hispanic |   .1875168    .119659     1.57   0.117    -.0470105    .4220441
   otherrace |   .1491671   .1735122     0.86   0.390    -.1909106    .4892448
       _cons |   .4622287   .0548613     8.43   0.000     .3547026    .5697549
-------------+----------------------------------------------------------------
college      |
    distance |  -.0069746   .0004853   -14.37   0.000    -.0079257   -.0060235
       black |   -.057824   .0137609    -4.20   0.000    -.0847949   -.0308531
    hispanic |   -.116329   .0119552    -9.73   0.000    -.1397607   -.0928972
   otherrace |   .0335953    .019631     1.71   0.087    -.0048807    .0720712
       _cons |   .6437234   .0080333    80.13   0.000     .6279783    .6594684
-------------+----------------------------------------------------------------
collegexbl~k |
       black |   .5811072   .0072738    79.89   0.000     .5668508    .5953636
  distxblack |  -.0063497   .0006164   -10.30   0.000    -.0075578   -.0051416
       _cons |  -3.56e-17   .0019577    -0.00   1.000    -.0038369    .0038369
-------------+----------------------------------------------------------------
collegexhi~c |
    hispanic |   .5199955   .0074862    69.46   0.000     .5053227    .5346683
distxhispa~c |   -.006104   .0005602   -10.90   0.000     -.007202   -.0050059
       _cons |  -3.05e-17   .0025763    -0.00   1.000    -.0050494    .0050494
-------------+----------------------------------------------------------------
collegexot~e |
   otherrace |   .7022688   .0072187    97.28   0.000     .6881204    .7164171
distxother~e |  -.0098877   .0005948   -16.62   0.000    -.0110534    -.008722
       _cons |   3.47e-18   .0011358     0.00   1.000    -.0022261    .0022261
------------------------------------------------------------------------------
Endogenous variables:  register college collegexblack collegexhispanic 
     collegexotherrace 
Exogenous variables:   black hispanic otherrace distance distxblack 
     distxhispanic distxotherrace 
------------------------------------------------------------------------------

matrix list e(Sigma)

symmetric e(Sigma)[5,5]
                  register       college  collegexbl~k  collegexhi~c  collegexot~e
    register      .2180383
     college    -.01156577      .2423956
collegexbl~k     .00601057     .03092783     .03092783
collegexhi~c     .00522595     .04906227             0     .04906227
collegexot~e     .00217381     .01131573             0             0     .01131573

The analyses in shown in Table 10.9 includes a variable that is restricted, so these
analyses cannot be reproduced using the available dataset.