Chapter 16: Simultaneous Equations Models

library(AER)
library(wooldridge)

Example 16.5

data("mroz")

s.iv.1 <- summary(iv.1 <- ivreg(hours ~ lwage + educ + age + kidslt6 + nwifeinc |
                                  educ + age + kidslt6 + nwifeinc + exper + expersq,
                                data = mroz))
s.iv.1
## 
## Call:
## ivreg(formula = hours ~ lwage + educ + age + kidslt6 + nwifeinc | 
##     educ + age + kidslt6 + nwifeinc + exper + expersq, data = mroz)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -4570.13  -654.08   -36.94   569.86  8372.91 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 2225.662    574.564   3.874 0.000124 ***
## lwage       1639.556    470.576   3.484 0.000545 ***
## educ        -183.751     59.100  -3.109 0.002003 ** 
## age           -7.806      9.378  -0.832 0.405664    
## kidslt6     -198.154    182.929  -1.083 0.279325    
## nwifeinc     -10.170      6.615  -1.537 0.124942    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1354 on 422 degrees of freedom
## Multiple R-Squared: -2.008,  Adjusted R-squared: -2.043 
## Wald test: 3.441 on 5 and 422 DF,  p-value: 0.004648
lm.1 <- lm(lwage ~ educ + age + kidslt6 + nwifeinc + exper + expersq,
           data = mroz[mroz$inlf==1,])

lm.2 <- lm(hours ~ lwage + educ + age + kidslt6 + nwifeinc + lm.1$residuals,
           data = mroz[mroz$inlf==1,])

summary(lm.2)
## 
## Call:
## lm(formula = hours ~ lwage + educ + age + kidslt6 + nwifeinc + 
##     lm.1$residuals, data = mroz[mroz$inlf == 1, ])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1600.5  -548.6   107.7   461.4  3075.2 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     2225.662    309.976   7.180 3.18e-12 ***
## lwage           1639.556    253.875   6.458 2.93e-10 ***
## educ            -183.751     31.884  -5.763 1.60e-08 ***
## age               -7.806      5.059  -1.543  0.12361    
## kidslt6         -198.154     98.690  -2.008  0.04530 *  
## nwifeinc         -10.170      3.569  -2.850  0.00459 ** 
## lm.1$residuals -1714.358    259.439  -6.608 1.18e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 730.6 on 421 degrees of freedom
## Multiple R-squared:  0.1267, Adjusted R-squared:  0.1142 
## F-statistic: 10.18 on 6 and 421 DF,  p-value: 1.592e-10

Example 16.6

data("openness")

s.lm.1 <- summary(lm.1 <- lm(open ~ lpcinc + lland, data = openness))
s.lm.1
## 
## Call:
## lm(formula = open ~ lpcinc + lland, data = openness)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -31.907  -8.843  -3.109   6.057  82.792 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 117.0845    15.8483   7.388 2.97e-11 ***
## lpcinc        0.5465     1.4932   0.366    0.715    
## lland        -7.5671     0.8142  -9.294 1.51e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 17.8 on 111 degrees of freedom
## Multiple R-squared:  0.4487, Adjusted R-squared:  0.4387 
## F-statistic: 45.17 on 2 and 111 DF,  p-value: 4.451e-15
s.iv.1 <- summary(iv.1 <- ivreg(inf ~ open +lpcinc |
                                  lpcinc + lland,
                                data = openness))
s.iv.1
## 
## Call:
## ivreg(formula = inf ~ open + lpcinc | lpcinc + lland, data = openness)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -21.686 -10.176  -5.857   2.912 184.875 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  26.8993    15.4012   1.747   0.0835 .
## open         -0.3375     0.1441  -2.342   0.0210 *
## lpcinc        0.3758     2.0151   0.187   0.8524  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 23.84 on 111 degrees of freedom
## Multiple R-Squared: 0.03088, Adjusted R-squared: 0.01341 
## Wald test:  2.79 on 2 and 111 DF,  p-value: 0.06574

Example 16.7

data("consump")

s.iv.1 <- summary(iv.1 <- ivreg(gc ~ gy + r3 |
                                  gc_1 + gy_1 +r3_1,
                                data = consump))
s.iv.1
## 
## Call:
## ivreg(formula = gc ~ gy + r3 | gc_1 + gy_1 + r3_1, data = consump)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0135627 -0.0035412 -0.0006202  0.0036514  0.0128639 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.0080597  0.0032327   2.493 0.018026 *  
## gy           0.5861880  0.1345737   4.356 0.000128 ***
## r3          -0.0002694  0.0007640  -0.353 0.726698    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.007471 on 32 degrees of freedom
## Multiple R-Squared: 0.6779,  Adjusted R-squared: 0.6578 
## Wald test: 9.586 on 2 and 32 DF,  p-value: 0.0005468

Example 16.8

data("prison")

s.lm.1 <- summary(lm.1 <- lm(gcriv ~ y81 + y82 + y83 + y84 + y85 + y86 + y87 + y88 +
                               y89 + y90 + y91 + y92 + y93 + gpris + gpolpc + gincpc +
                               cunem + cblack + cmetro + cag0_14 + cag15_17 + cag18_24 +
                               cag25_34,
                             data = prison))
s.lm.1
## 
## Call:
## lm(formula = gcriv ~ y81 + y82 + y83 + y84 + y85 + y86 + y87 + 
##     y88 + y89 + y90 + y91 + y92 + y93 + gpris + gpolpc + gincpc + 
##     cunem + cblack + cmetro + cag0_14 + cag15_17 + cag18_24 + 
##     cag25_34, data = prison)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.32282 -0.04186  0.00283  0.04109  0.50580 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.005671   0.021558  -0.263 0.792597    
## y81         -0.068626   0.017409  -3.942 8.91e-05 ***
## y82         -0.040773   0.020196  -2.019 0.043894 *  
## y83         -0.042178   0.019804  -2.130 0.033550 *  
## y84         -0.013660   0.022350  -0.611 0.541290    
## y85          0.009404   0.020782   0.453 0.651037    
## y86          0.044095   0.022736   1.939 0.052854 .  
## y87         -0.023960   0.021713  -1.103 0.270212    
## y88          0.034758   0.021613   1.608 0.108253    
## y89          0.025357   0.021867   1.160 0.246603    
## y90          0.087170   0.021185   4.115 4.35e-05 ***
## y91          0.038884   0.021359   1.821 0.069111 .  
## y92          0.008150   0.022659   0.360 0.719183    
## y93          0.008714   0.024004   0.363 0.716698    
## gpris       -0.180897   0.047628  -3.798 0.000159 ***
## gpolpc       0.051424   0.055516   0.926 0.354619    
## gincpc       0.738368   0.166378   4.438 1.06e-05 ***
## cunem        0.411260   0.393670   1.045 0.296536    
## cblack      -0.014743   0.033157  -0.445 0.656708    
## cmetro       0.538306   0.995660   0.541 0.588922    
## cag0_14      0.989306   2.006539   0.493 0.622140    
## cag15_17     4.983840   4.740475   1.051 0.293472    
## cag18_24     2.412758   2.191017   1.101 0.271192    
## cag25_34     2.879946   2.228829   1.292 0.196743    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07893 on 690 degrees of freedom
## Multiple R-squared:  0.2311, Adjusted R-squared:  0.2055 
## F-statistic: 9.019 on 23 and 690 DF,  p-value: < 2.2e-16
s.iv.1 <- summary(iv.1 <- ivreg(gcriv ~ y81 + y82 + y83 + y84 + y85 + y86 + y87 + y88 +
                                  y89 + y90 + y91 + y92 + y93 + gpris + gpolpc + gincpc +
                                  cunem + cblack + cmetro + cag0_14 + cag15_17 + cag18_24 +
                                  cag25_34 |
                                  y81 + y82 + y83 + y84 + y85 + y86 + y87 + y88 +
                                  y89 + y90 + y91 + y92 + y93 + gpolpc + gincpc +
                                  cunem + cblack + cmetro + cag0_14 + cag15_17 + cag18_24 +
                                  cag25_34 + final1 + final2,
                                data = prison))
s.iv.1
## 
## Call:
## ivreg(formula = gcriv ~ y81 + y82 + y83 + y84 + y85 + y86 + y87 + 
##     y88 + y89 + y90 + y91 + y92 + y93 + gpris + gpolpc + gincpc + 
##     cunem + cblack + cmetro + cag0_14 + cag15_17 + cag18_24 + 
##     cag25_34 | y81 + y82 + y83 + y84 + y85 + y86 + y87 + y88 + 
##     y89 + y90 + y91 + y92 + y93 + gpolpc + gincpc + cunem + cblack + 
##     cmetro + cag0_14 + cag15_17 + cag18_24 + cag25_34 + final1 + 
##     final2, data = prison)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.3863488 -0.0567073 -0.0002044  0.0509309  0.4133336 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.014838   0.027520   0.539  0.58995    
## y81         -0.056073   0.021735  -2.580  0.01009 *  
## y82          0.028462   0.038477   0.740  0.45973    
## y83          0.024703   0.037397   0.661  0.50911    
## y84          0.012870   0.029334   0.439  0.66098    
## y85          0.035403   0.027502   1.287  0.19844    
## y86          0.092186   0.034388   2.681  0.00752 ** 
## y87          0.004771   0.029015   0.164  0.86944    
## y88          0.053271   0.027322   1.950  0.05161 .  
## y89          0.043086   0.027520   1.566  0.11790    
## y90          0.144265   0.035462   4.068 5.29e-05 ***
## y91          0.061848   0.027650   2.237  0.02562 *  
## y92          0.026657   0.028533   0.934  0.35050    
## y93          0.022274   0.029610   0.752  0.45216    
## gpris       -1.031956   0.369963  -2.789  0.00543 ** 
## gpolpc       0.035315   0.067499   0.523  0.60101    
## gincpc       0.910199   0.214327   4.247 2.47e-05 ***
## cunem        0.523696   0.478563   1.094  0.27420    
## cblack      -0.015848   0.040104  -0.395  0.69285    
## cmetro      -0.591517   1.298252  -0.456  0.64880    
## cag0_14      3.379384   2.634893   1.283  0.20008    
## cag15_17     3.549945   5.766302   0.616  0.53834    
## cag18_24     3.358348   2.680839   1.253  0.21073    
## cag25_34     2.319993   2.706345   0.857  0.39161    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.09547 on 690 degrees of freedom
## Multiple R-Squared: -0.1246, Adjusted R-squared: -0.1621 
## Wald test: 6.075 on 23 and 690 DF,  p-value: < 2.2e-16