UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Stata Textbook Examples
Applied Regression Analysis by John Fox
Chapter 13: Collinearity and Its Purported Remedies

Page 343, table 13.1 Regression of estimated 1980 U.S. census undercount of area characteristics, for 66 central cities, state remainders, and states.
NOTE: Stata lists the variables in descending order of their VIF, which is different from the order that they are listed in the text.
use http://www.ats.ucla.edu/stat/stata/examples/ara/ericksen, clear
(From Fox, Applied Regression Analysis.  Use 'notes' command for source of data)

regress undcount perc_min crimrate poverty diffeng hsgrad housing city countprc

      Source |       SS       df       MS              Number of obs =      66
-------------+------------------------------           F(  8,    57) =   17.25
       Model |  280.795421     8  35.0994276           Prob > F      =  0.0000
    Residual |  115.984804    57  2.03482113           R-squared     =  0.7077
-------------+------------------------------           Adj R-squared =  0.6667
       Total |  396.780225    65  6.10431116           Root MSE      =  1.4265

------------------------------------------------------------------------------
    undcount |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    perc_min |   .0798341   .0226094     3.53   0.001     .0345595    .1251086
    crimrate |   .0301168   .0129978     2.32   0.024     .0040892    .0561444
     poverty |   -.178369   .0849158    -2.10   0.040    -.3484098   -.0083281
     diffeng |   .2151249   .0922088     2.33   0.023     .0304799    .3997699
      hsgrad |   .0612903   .0447749     1.37   0.176    -.0283698    .1509505
     housing |  -.0349569   .0246298    -1.42   0.161    -.0842771    .0143633
        city |   1.159982   .7706438     1.51   0.138    -.3832056    2.703169
    countprc |   .0369889   .0092531     4.00   0.000     .0184598     .055518
       _cons |  -1.771393   1.382183    -1.28   0.205    -4.539166    .9963797
------------------------------------------------------------------------------

* Stata 8 code.
vif

* Stata 9 code and output.
estat vif

    Variable |       VIF       1/VIF  
-------------+----------------------
    perc_min |      5.01    0.199638
     poverty |      4.63    0.216208
      hsgrad |      4.62    0.216489
        city |      3.54    0.282666
    crimrate |      3.34    0.299080
     housing |      1.87    0.534261
    countprc |      1.69    0.591254
     diffeng |      1.64    0.611409
-------------+----------------------
    Mean VIF |      3.29

display sqrt(5.01)
2.2383029

di sqrt(4.63)
2.1517435

di sqrt(4.62)
2.1494185

di sqrt(3.54)
1.8814888

di sqrt(3.34)
1.8275667

di sqrt(1.87)
1.3674794

di sqrt(1.69)
1.3

di sqrt(1.64)
1.2806248
Page 343 Table 13.2 Correlations among eight predictors of the 1980 U.S. census undercount.
corr perc_min crimrate poverty diffeng hsgrad housing city countprc

(obs=66)

             | perc_min crimrate  poverty  diffeng   hsgrad  housing     city
-------------+---------------------------------------------------------------
    perc_min |   1.0000
    crimrate |   0.6549   1.0000
     poverty |   0.7384   0.3691   1.0000
     diffeng |   0.3954   0.5116   0.1516   1.0000
      hsgrad |   0.5352   0.0666   0.7506  -0.1164   1.0000
     housing |   0.3568   0.5317   0.3352   0.3402   0.2348   1.0000
        city |   0.7577   0.7286   0.5375   0.4804   0.3148   0.5657   1.0000
    countprc |  -0.3344  -0.2331  -0.1570  -0.1082  -0.4142  -0.0863  -0.2688

             | countprc
-------------+---------
    countprc |   1.0000
Page 355, table 13.3 B. Fox's Canadian women's labor force participation data T is year; L is women's labor force participation rate, in percent; F is the total fertility rate, per 1000; M is men's average weekly wages in 1935 dollars; W is women's average weekly wages; D is per-capita consumer debt; and P is the percentage of part-time workers.
use http://www.ats.ucla.edu/stat/stata/examples/ara/bfox, clear
(From Fox, Applied Regression Analysis.  Use 'notes' command for source of data)

list year womwork fertil mwage fwage debt parttime

Observation 1
        year         1946     womwork         25.3      fertil         3748
       mwage        25.35       fwage        14.05        debt        18.18
    parttime        10.28


Observation 2
        year         1947     womwork         24.4      fertil         3996
       mwage        26.14       fwage        14.61        debt        28.33
    parttime         9.28


Observation 3
        year         1948     womwork         24.2      fertil         3725
       mwage        25.11       fwage        14.23        debt        30.55
    parttime         9.51


Observation 4
        year         1949     womwork         24.2      fertil         3750
       mwage        25.45       fwage        14.61        debt        35.81
    parttime         8.87


Observation 5
        year         1950     womwork         23.7      fertil         3669
       mwage        26.79       fwage        15.26        debt        38.39
    parttime         8.54


Observation 6
        year         1951     womwork         24.2      fertil         3682
       mwage        26.33       fwage        14.58        debt        26.52
    parttime         8.84


Observation 7
        year         1952     womwork         24.1      fertil         3845
       mwage        27.89       fwage        15.66        debt        45.65
    parttime          8.6


Observation 8
        year         1953     womwork         23.8      fertil         3905
       mwage        29.15       fwage         16.3        debt        52.99
    parttime         5.49


Observation 9
        year         1954     womwork         23.6      fertil         4047
       mwage        29.52       fwage        16.57        debt        54.84
    parttime         6.67


Observation 10
        year         1955     womwork         24.3      fertil         4043
       mwage        32.05       fwage        17.99        debt        65.53
    parttime         6.25


Observation 11
        year         1956     womwork         25.1      fertil         4092
       mwage        32.98       fwage        18.33        debt        72.56
    parttime         6.32


Observation 12
        year         1957     womwork         26.2      fertil         4168
       mwage        32.25       fwage        17.64        debt        69.49
    parttime          7.3


Observation 13
        year         1958     womwork         26.6      fertil         4073
       mwage        32.52       fwage        18.16        debt        71.71
    parttime         8.65


Observation 14
        year         1959     womwork         26.9      fertil         4100
       mwage        33.95       fwage        18.58        debt        78.89
    parttime          8.8


Observation 15
        year         1960     womwork         27.9      fertil         4119
       mwage        34.63       fwage        18.95        debt        84.99
    parttime         9.39


Observation 16
        year         1961     womwork         29.1      fertil         4159
       mwage        35.14       fwage        18.78        debt        87.71
    parttime        10.23


Observation 17
        year         1962     womwork         29.9      fertil         4134
       mwage        34.49       fwage        18.74        debt        95.31
    parttime        10.77


Observation 18
        year         1963     womwork         29.8      fertil         4017
       mwage        35.99       fwage        19.71        debt        104.4
    parttime        10.84


Observation 19
        year         1964     womwork         30.9      fertil         3886
       mwage        36.68       fwage        20.06        debt        116.8
    parttime         11.7


Observation 20
        year         1965     womwork         32.1      fertil         3467
       mwage        37.96       fwage        20.94        debt       130.99
    parttime        12.33


Observation 21
        year         1966     womwork         33.2      fertil         3150
       mwage        38.68       fwage         21.2        debt       135.25
    parttime        12.18


Observation 22
        year         1967     womwork         34.5      fertil         2879
       mwage        39.65       fwage        21.95        debt       142.93
    parttime        13.67


Observation 23
        year         1968     womwork         35.1      fertil         2681
       mwage         41.2       fwage        22.68        debt       155.47
    parttime        13.82


Observation 24
        year         1969     womwork         36.1      fertil         2563
       mwage        42.44       fwage        23.75        debt       165.04
    parttime        14.91


Observation 25
        year         1970     womwork         36.9      fertil         2571
       mwage        42.02       fwage        25.63        debt       164.53
    parttime        15.52


Observation 26
        year         1971     womwork           37      fertil         2503
       mwage        45.32       fwage        26.79        debt       169.63
    parttime        15.47


Observation 27
        year         1972     womwork         37.9      fertil         2302
       mwage        45.61       fwage        27.51        debt       190.62
    parttime        15.85


Observation 28
        year         1973     womwork         40.1      fertil         2931
       mwage        45.59       fwage        27.35        debt        209.6
    parttime         15.4


Observation 29
        year         1974     womwork         40.6      fertil         1875
       mwage        48.06       fwage        29.64        debt       216.66
    parttime        16.23


Observation 30
        year         1975     womwork         42.2      fertil         1866
       mwage        46.12       fwage        29.33        debt       224.34
    parttime        16.71
Page 358, Figure 13.6 Plot of C(p)-p against p for the census undercount regression. Only subsets for which C(p)-p < 10 are shown. The following capitalized letter are employed to label the predictors in each subset: Minority, Crime, Poverty, Language, High school, hOusing, cIty, and coNventaional. Ericksen, et al. (1989) selected the predictor subset MCN (i.e., Minority, Crime and coNventaional).
NOTE: We were unable to reproduce this graph.
Page 359 Table 13.4 Best subset regression models for Ericksen et. al.'s census undercount data. Coefficient standard errors are in parentheses.
use http://www.ats.ucla.edu/stat/stata/examples/ara/ericksen, clear
(From Fox, Applied Regression Analysis.  Use 'notes' command for source of data)
p = 4
regress undcount perc_min crimrate countprc   

      Source |       SS       df       MS              Number of obs =      66
-------------+------------------------------           F(  3,    62) =   36.35
       Model |  252.966408     3   84.322136           Prob > F      =  0.0000
    Residual |  143.813817    62   2.3195777           R-squared     =  0.6375
-------------+------------------------------           Adj R-squared =  0.6200
       Total |  396.780225    65  6.10431116           Root MSE      =   1.523

------------------------------------------------------------------------------
    undcount |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    perc_min |   .0786078     .01473     5.34   0.000     .0491629    .1080527
    crimrate |   .0363026   .0100445     3.61   0.001      .016224    .0563813
    countprc |   .0280009   .0080623     3.47   0.001     .0118846    .0441172
       _cons |   -2.22443   .5609767    -3.97   0.000    -3.345807   -1.103054
------------------------------------------------------------------------------
p = 5
regress undcount perc_min crimrate countprc diffeng   

      Source |       SS       df       MS              Number of obs =      66
-------------+------------------------------           F(  4,    61) =   30.84
       Model |  265.503897     4  66.3759742           Prob > F      =  0.0000
    Residual |  131.276328    61  2.15207096           R-squared     =  0.6691
-------------+------------------------------           Adj R-squared =  0.6475
       Total |  396.780225    65  6.10431116           Root MSE      =   1.467

------------------------------------------------------------------------------
    undcount |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    perc_min |   .0751885   .0142587     5.27   0.000     .0466764    .1037006
    crimrate |    .027154    .010391     2.61   0.011     .0063758    .0479321
    countprc |   .0272961   .0077712     3.51   0.001     .0117566    .0428356
     diffeng |   .2093535   .0867368     2.41   0.019     .0359126    .3827943
       _cons |  -1.975947   .5500616    -3.59   0.001    -3.075864   -.8760313
------------------------------------------------------------------------------
p = 6
regress undcount perc_min crimrate countprc diffeng poverty  

      Source |       SS       df       MS              Number of obs =      66
-------------+------------------------------           F(  5,    60) =   26.16
       Model |  272.005773     5  54.4011547           Prob > F      =  0.0000
    Residual |  124.774452    60   2.0795742           R-squared     =  0.6855
-------------+------------------------------           Adj R-squared =  0.6593
       Total |  396.780225    65  6.10431116           Root MSE      =  1.4421

------------------------------------------------------------------------------
    undcount |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    perc_min |   .1009673   .0202241     4.99   0.000     .0605131    .1414214
    crimrate |   .0243456   .0103372     2.36   0.022      .003668    .0450231
    countprc |    .029327   .0077251     3.80   0.000     .0138746    .0447795
     diffeng |   .1838497   .0864747     2.13   0.038     .0108747    .3568248
     poverty |  -.1100304   .0622272    -1.77   0.082    -.2345034    .0144426
       _cons |  -.7926886    .860341    -0.92   0.361    -2.513627    .9282497
------------------------------------------------------------------------------

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.