-------------------------------------------------------------------------------
       log:  C:\Temp\web\class\5213\2008\HW_E10.2.log
  log type:  text
 opened on:  25 Nov 2008, 12:10:02

. do "C:\Temp\web\class\5213\2008\HW_E10.2"

. use "http://www.learneconometrics.com/data/stata/SeatBelts.dta", clear

. xtset fips year, yearly
       panel variable:  fips (strongly balanced)
        time variable:  year, 1983 to 1997
                delta:  1 year

. 
. gen ln_inc=log(income)

. regress  fatalityrate  sb_useage speed65 speed70 ba08 drinkage21 ln_inc age, 
> vce(hc3)

Linear regression                                      Number of obs =     556
                                                       F(  7,   548) =   88.52
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.5493
                                                       Root MSE      =   .0034

------------------------------------------------------------------------------
             |             Robust HC3
fatalityrate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   sb_useage |   .0040684   .0012436     3.27   0.001     .0016255    .0065113
     speed65 |   .0001479    .000413     0.36   0.720    -.0006634    .0009592
     speed70 |   .0024045   .0004809     5.00   0.000     .0014598    .0033491
        ba08 |  -.0019246   .0003676    -5.24   0.000    -.0026466   -.0012025
  drinkage21 |   .0000799   .0010237     0.08   0.938     -.001931    .0020908
      ln_inc |  -.0181444   .0011013   -16.48   0.000    -.0203077   -.0159811
         age |  -7.22e-06   .0001687    -0.04   0.966    -.0003386    .0003241
       _cons |   .1965469   .0093676    20.98   0.000      .178146    .2149478
------------------------------------------------------------------------------

. 
. /* One sided t-test on the sb_useage coefficient is 
>    not rejected at the 5% level.  It actually has the
>    wrong sign.  */
. 
. xtreg fatalityrate sb_useage speed65 speed70 ba08 drinkage21 ln_inc age, fe v
> ce(cluster fips)

Fixed-effects (within) regression               Number of obs      =       556
Group variable: fips                            Number of groups   =        51

R-sq:  within  = 0.6868                         Obs per group: min =         8
       between = 0.1957                                        avg =      10.9
       overall = 0.3896                                        max =        15

                                                F(7,50)            =     96.72
corr(u_i, Xb)  = -0.1332                        Prob > F           =    0.0000

                                  (Std. Err. adjusted for 51 clusters in fips)
------------------------------------------------------------------------------
             |               Robust
fatalityrate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   sb_useage |  -.0057748   .0016693    -3.46   0.001    -.0091276    -.002422
     speed65 |   -.000425   .0004555    -0.93   0.355    -.0013399    .0004898
     speed70 |   .0012333   .0003483     3.54   0.001     .0005337    .0019329
        ba08 |  -.0013775   .0003751    -3.67   0.001    -.0021308   -.0006241
  drinkage21 |   .0007453   .0007184     1.04   0.305    -.0006976    .0021883
      ln_inc |  -.0135144   .0023849    -5.67   0.000    -.0183047   -.0087241
         age |   .0009787   .0007461     1.31   0.196    -.0005199    .0024772
       _cons |   .1209958   .0184235     6.57   0.000     .0839912    .1580005
-------------+----------------------------------------------------------------
     sigma_u |  .00383103
     sigma_e |   .0017871
         rho |  .82128567   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. xi:  regress  fatalityrate  sb_useage speed65 speed70 ba08 drinkage21 ln_inc 
> age i.state, vce(cluster fips)  
i.state           _Istate_1-51        (_Istate_1 for state==AK omitted)

Linear regression                                      Number of obs =     556
                                                       F(  6,    50) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.8867
                                                       Root MSE      =  .00179

                                  (Std. Err. adjusted for 51 clusters in fips)
------------------------------------------------------------------------------
             |               Robust
fatalityrate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   sb_useage |  -.0057748    .001751    -3.30   0.002    -.0092919   -.0022577
     speed65 |   -.000425   .0004778    -0.89   0.378    -.0013847    .0005346
     speed70 |   .0012333   .0003654     3.38   0.001     .0004994    .0019671
        ba08 |  -.0013775   .0003935    -3.50   0.001    -.0021677   -.0005872
  drinkage21 |   .0007453   .0007536     0.99   0.327    -.0007684     .002259
      ln_inc |  -.0135144   .0025018    -5.40   0.000    -.0185394   -.0084894
         age |   .0009787   .0007826     1.25   0.217    -.0005933    .0025507
   _Istate_2 |  -.0100326   .0046542    -2.16   0.036    -.0193809   -.0006843
   _Istate_3 |  -.0088063   .0053089    -1.66   0.103    -.0194695     .001857
   _Istate_4 |  -.0077847   .0040126    -1.94   0.058    -.0158443    .0002748
   _Istate_5 |  -.0084504   .0027398    -3.08   0.003    -.0139534   -.0029474
   _Istate_6 |  -.0100656    .003196    -3.15   0.003    -.0164849   -.0036463
   _Istate_7 |   -.014228   .0046824    -3.04   0.004     -.023633    -.004823
   _Istate_8 |  -.0094609   .0048581    -1.95   0.057    -.0192187     .000297
   _Istate_9 |  -.0107791   .0040573    -2.66   0.011    -.0189284   -.0026297
  _Istate_10 |   -.009097   .0067669    -1.34   0.185    -.0226887    .0044947
  _Istate_11 |  -.0106959   .0030523    -3.50   0.001    -.0168267   -.0045651
  _Istate_12 |  -.0106724    .003575    -2.99   0.004     -.017853   -.0034918
  _Istate_13 |  -.0126377    .005305    -2.38   0.021    -.0232932   -.0019823
  _Istate_14 |  -.0073945   .0032189    -2.30   0.026    -.0138598   -.0009292
  _Istate_15 |  -.0114182   .0038587    -2.96   0.005    -.0191686   -.0036677
  _Istate_16 |  -.0141274   .0042701    -3.31   0.002    -.0227042   -.0055506
  _Istate_17 |  -.0117984   .0043514    -2.71   0.009    -.0205384   -.0030583
  _Istate_18 |  -.0122204   .0046016    -2.66   0.011    -.0214631   -.0029777
  _Istate_19 |  -.0075329   .0032884    -2.29   0.026    -.0141378   -.0009279
  _Istate_20 |  -.0179998   .0047579    -3.78   0.000    -.0275563   -.0084433
  _Istate_21 |  -.0108678   .0036149    -3.01   0.004    -.0181285    -.003607
  _Istate_22 |  -.0159934   .0051506    -3.11   0.003    -.0263388   -.0056481
  _Istate_23 |  -.0119118   .0038201    -3.12   0.003    -.0195847    -.004239
  _Istate_24 |  -.0157803   .0038085    -4.14   0.000    -.0234298   -.0081308
  _Istate_25 |  -.0114279   .0047071    -2.43   0.019    -.0208824   -.0019733
  _Istate_26 |  -.0061523   .0039693    -1.55   0.127    -.0141248    .0018203
  _Istate_27 |  -.0087854   .0045463    -1.93   0.059     -.017917    .0003461
  _Istate_28 |  -.0085751   .0044108    -1.94   0.058    -.0174344    .0002842
  _Istate_29 |  -.0194209   .0048295    -4.02   0.000    -.0291212   -.0097206
  _Istate_30 |   -.014221   .0045106    -3.15   0.003    -.0232808   -.0051612
  _Istate_31 |   -.014161    .003726    -3.80   0.000    -.0216449   -.0066771
  _Istate_32 |  -.0147025   .0047002    -3.13   0.003    -.0241432   -.0052619
  _Istate_33 |  -.0054123   .0031929    -1.70   0.096    -.0118256    .0010009
  _Istate_34 |  -.0033945   .0037189    -0.91   0.366    -.0108642    .0040752
  _Istate_35 |  -.0106957   .0044915    -2.38   0.021    -.0197172   -.0016742
  _Istate_36 |  -.0146726   .0044808    -3.27   0.002    -.0236726   -.0056726
  _Istate_37 |  -.0154988   .0046368    -3.34   0.002    -.0248121   -.0061855
  _Istate_38 |  -.0099978   .0048078    -2.08   0.043    -.0196545   -.0003411
  _Istate_39 |  -.0139136   .0056767    -2.45   0.018    -.0253156   -.0025117
  _Istate_40 |  -.0212217   .0053562    -3.96   0.000    -.0319799   -.0104634
  _Istate_41 |  -.0073329   .0040999    -1.79   0.080    -.0155677    .0009019
  _Istate_42 |  -.0128356   .0044655    -2.87   0.006    -.0218047   -.0038664
  _Istate_43 |  -.0088454   .0046431    -1.91   0.063    -.0181714    .0004805
  _Istate_44 |  -.0094031   .0025433    -3.70   0.001    -.0145115   -.0042946
  _Istate_45 |  -.0096562   .0008935   -10.81   0.000    -.0114508   -.0078616
  _Istate_46 |  -.0131926   .0036813    -3.58   0.001    -.0205867   -.0057986
  _Istate_47 |  -.0131831   .0042013    -3.14   0.003    -.0216217   -.0047446
  _Istate_48 |  -.0136453   .0036837    -3.70   0.001    -.0210443   -.0062463
  _Istate_49 |  -.0152155   .0043274    -3.52   0.001    -.0239074   -.0065236
  _Istate_50 |  -.0117118   .0062208    -1.88   0.066    -.0242067    .0007831
  _Istate_51 |    -.00929   .0031968    -2.91   0.005    -.0157109   -.0028691
       _cons |   .1324191   .0177538     7.46   0.000     .0967596    .1680785
------------------------------------------------------------------------------

. /* Note that xtreg and xi do not produce the same results.  They should.  */
. 
. xi:  regress  fatalityrate  sb_useage speed65 speed70 ba08 drinkage21 ln_inc 
> age i.state i.year, vce(cluster state) 
i.state           _Istate_1-51        (_Istate_1 for state==AK omitted)
i.year            _Iyear_1983-1997    (naturally coded; _Iyear_1983 omitted)

Linear regression                                      Number of obs =     556
                                                       F( 20,    50) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.9098
                                                       Root MSE      =  .00162

                                 (Std. Err. adjusted for 51 clusters in state)
------------------------------------------------------------------------------
             |               Robust
fatalityrate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   sb_useage |  -.0037186   .0015246    -2.44   0.018    -.0067808   -.0006563
     speed65 |  -.0007833   .0006093    -1.29   0.205    -.0020071    .0004405
     speed70 |   .0008042   .0004803     1.67   0.100    -.0001605    .0017688
        ba08 |  -.0008225   .0004656    -1.77   0.083    -.0017577    .0001127
  drinkage21 |  -.0011337   .0006534    -1.74   0.089    -.0024461    .0001787
      ln_inc |   .0062643   .0070367     0.89   0.378    -.0078693    .0203979
         age |    .001318   .0007287     1.81   0.076    -.0001455    .0027816
   _Istate_2 |   -.006243   .0042864    -1.46   0.152    -.0148526    .0023666
   _Istate_3 |  -.0042506   .0049257    -0.86   0.392    -.0141441    .0056429
   _Istate_4 |  -.0052045   .0036443    -1.43   0.159    -.0125244    .0021154
   _Istate_5 |  -.0108974   .0026314    -4.14   0.000    -.0161828    -.005612
   _Istate_6 |  -.0108515   .0029089    -3.73   0.000    -.0166942   -.0050089
   _Istate_7 |  -.0221058   .0051785    -4.27   0.000    -.0325071   -.0117044
   _Istate_8 |  -.0171011   .0052623    -3.25   0.002    -.0276706   -.0065315
   _Istate_9 |  -.0135796   .0038423    -3.53   0.001     -.021297   -.0058622
  _Istate_10 |  -.0109605   .0061945    -1.77   0.083    -.0234025    .0014815
  _Istate_11 |    -.00924   .0027722    -3.33   0.002    -.0148082   -.0036718
  _Istate_12 |  -.0134439   .0034567    -3.89   0.000    -.0203869    -.006501
  _Istate_13 |  -.0119732   .0047437    -2.52   0.015    -.0215011   -.0024452
  _Istate_14 |  -.0031839   .0031233    -1.02   0.313    -.0094574    .0030895
  _Istate_15 |  -.0136302    .003581    -3.81   0.000    -.0208228   -.0064377
  _Istate_16 |    -.01306   .0038243    -3.41   0.001    -.0207414   -.0053786
  _Istate_17 |  -.0116617   .0039143    -2.98   0.004    -.0195238   -.0037997
  _Istate_18 |  -.0077006   .0042588    -1.81   0.077    -.0162548    .0008535
  _Istate_19 |  -.0031251   .0032216    -0.97   0.337    -.0095959    .0033456
  _Istate_20 |  -.0226125   .0047388    -4.77   0.000    -.0321305   -.0130944
  _Istate_21 |  -.0145783    .003507    -4.16   0.000    -.0216224   -.0075343
  _Istate_22 |  -.0143826   .0046614    -3.09   0.003    -.0237454   -.0050199
  _Istate_23 |  -.0123339   .0034336    -3.59   0.001    -.0192304   -.0054374
  _Istate_24 |  -.0169814    .003445    -4.93   0.000    -.0239008    -.010062
  _Istate_25 |  -.0106489    .004242    -2.51   0.015    -.0191692   -.0021286
  _Istate_26 |   .0013805   .0041246     0.33   0.739     -.006904     .009665
  _Istate_27 |  -.0054104   .0041902    -1.29   0.203    -.0138267    .0030059
  _Istate_28 |  -.0075154   .0039383    -1.91   0.062    -.0154257     .000395
  _Istate_29 |  -.0152857   .0044524    -3.43   0.001    -.0242286   -.0063428
  _Istate_30 |  -.0131598   .0040601    -3.24   0.002    -.0213147    -.005005
  _Istate_31 |  -.0169859   .0035462    -4.79   0.000    -.0241087   -.0098631
  _Istate_32 |  -.0209118   .0049428    -4.23   0.000    -.0308398   -.0109838
  _Istate_33 |   -.000588   .0031653    -0.19   0.853    -.0069456    .0057696
  _Istate_34 |  -.0049867   .0034257    -1.46   0.152    -.0118674    .0018939
  _Istate_35 |  -.0156315   .0044918    -3.48   0.001    -.0246536   -.0066094
  _Istate_36 |  -.0147419   .0040165    -3.67   0.001    -.0228094   -.0066745
  _Istate_37 |  -.0119849   .0042589    -2.81   0.007    -.0205392   -.0034307
  _Istate_38 |  -.0102034   .0043233    -2.36   0.022     -.018887   -.0015198
  _Istate_39 |  -.0157842   .0053463    -2.95   0.005    -.0265225    -.005046
  _Istate_40 |  -.0224869   .0050609    -4.44   0.000    -.0326521   -.0123217
  _Istate_41 |  -.0033727   .0038123    -0.88   0.381    -.0110299    .0042844
  _Istate_42 |  -.0089397    .004125    -2.17   0.035    -.0172251   -.0006544
  _Istate_43 |  -.0071673   .0041736    -1.72   0.092    -.0155502    .0012156
  _Istate_44 |  -.0076143   .0022887    -3.33   0.002    -.0122113   -.0030174
  _Istate_45 |  -.0035202   .0019423    -1.81   0.076    -.0074214    .0003809
  _Istate_46 |  -.0151335   .0033838    -4.47   0.000      -.02193   -.0083369
  _Istate_47 |  -.0125393   .0037681    -3.33   0.002    -.0201077   -.0049708
  _Istate_48 |  -.0149413   .0033425    -4.47   0.000    -.0216549   -.0082277
  _Istate_49 |   -.014876   .0038718    -3.84   0.000    -.0226527   -.0070993
  _Istate_50 |  -.0071627    .005718    -1.25   0.216    -.0186477    .0043223
  _Istate_51 |  -.0072928   .0028862    -2.53   0.015    -.0130899   -.0014957
 _Iyear_1984 |  -.0004319   .0014475    -0.30   0.767    -.0033392    .0024754
 _Iyear_1985 |  -.0010707    .001853    -0.58   0.566    -.0047925    .0026512
 _Iyear_1986 |  -.0005777    .002109    -0.27   0.785    -.0048138    .0036583
 _Iyear_1987 |  -.0008722   .0026195    -0.33   0.741    -.0061336    .0043892
 _Iyear_1988 |   -.001885   .0030219    -0.62   0.536    -.0079547    .0041847
 _Iyear_1989 |  -.0041766   .0034205    -1.22   0.228    -.0110468    .0026936
 _Iyear_1990 |   -.005266   .0037186    -1.42   0.163     -.012735    .0022031
 _Iyear_1991 |  -.0066622   .0039487    -1.69   0.098    -.0145935     .001269
 _Iyear_1992 |   -.008518   .0041863    -2.03   0.047    -.0169265   -.0001095
 _Iyear_1993 |  -.0089399   .0044105    -2.03   0.048    -.0177988   -.0000811
 _Iyear_1994 |  -.0096297   .0048249    -2.00   0.051    -.0193207    .0000613
 _Iyear_1995 |  -.0101123   .0051428    -1.97   0.055    -.0204419    .0002172
 _Iyear_1996 |  -.0110766   .0054713    -2.02   0.048     -.022066   -.0000871
 _Iyear_1997 |  -.0116075   .0058129    -2.00   0.051    -.0232831    .0000681
       _cons |  -.0668073   .0691961    -0.97   0.339    -.2057918    .0721772
------------------------------------------------------------------------------

. testparm _Iyear*

 ( 1)  _Iyear_1984 = 0
 ( 2)  _Iyear_1985 = 0
 ( 3)  _Iyear_1986 = 0
 ( 4)  _Iyear_1987 = 0
 ( 5)  _Iyear_1988 = 0
 ( 6)  _Iyear_1989 = 0
 ( 7)  _Iyear_1990 = 0
 ( 8)  _Iyear_1991 = 0
 ( 9)  _Iyear_1992 = 0
 (10)  _Iyear_1993 = 0
 (11)  _Iyear_1994 = 0
 (12)  _Iyear_1995 = 0
 (13)  _Iyear_1996 = 0
 (14)  _Iyear_1997 = 0

       F( 14,    50) =    8.90
            Prob > F =    0.0000

. scalar sb_effect = _b[sb_useage]

. 
. summarize sb_useage fatalityrate

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
   sb_useage |       556    .5288518    .1701859        .06        .87
fatalityrate |       765    .0214895    .0061713   .0083273   .0454701

. 
. scalar d_fr = sb_effect*0.38

. scalar list d_fr
      d_fr = -.00141305

. 
. /* Get the total vehicle miles for 1997
>    Here I multiply the average times the number of states */
. summarize vmt if year == 1997

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         vmt |        51    50203.37     51775.3       3326     285612

. scalar miles = 51*r(mean)

. 
. scalar lives_saved = miles * d_fr

. scalar list lives_saved miles
lives_saved = -3617.9379
     miles =    2560372

. di "The fatalities change by approximately " lives_saved "
The fatalities change by approximately -3617.9379

. di "Based on an estimated " miles " miles of highway in the US in 1997." 
Based on an estimated 2560372 miles of highway in the US in 1997.

. 
. /* First, run the regression and determine how much sb usage increases
> ** when switching between secondary to primary enforcement.  Then
> ** multiply this times the seat belt effect in the fatality rate regression.
> */
. xi:  regress sb_useage primary secondary speed65 speed70 ba08 drinkage21 ln_i
> nc age i.year i.state, vce(cluster state)
i.year            _Iyear_1983-1997    (naturally coded; _Iyear_1983 omitted)
i.state           _Istate_1-51        (_Istate_1 for state==AK omitted)

Linear regression                                      Number of obs =     556
                                                       F( 21,    50) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.9016
                                                       Root MSE      =  .05722

                                 (Std. Err. adjusted for 51 clusters in state)
------------------------------------------------------------------------------
             |               Robust
   sb_useage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     primary |   .2055968   .0243489     8.44   0.000     .1566907     .254503
   secondary |   .1085184   .0140858     7.70   0.000     .0802262    .1368106
     speed65 |   .0228485   .0215529     1.06   0.294    -.0204417    .0661388
     speed70 |   .0120424   .0216313     0.56   0.580    -.0314054    .0554902
        ba08 |   .0037584    .018507     0.20   0.840     -.033414    .0409307
  drinkage21 |   .0107149   .0285425     0.38   0.709    -.0466144    .0680442
      ln_inc |   .0582708    .269387     0.22   0.830     -.482809    .5993506
         age |   .0138232   .0243016     0.57   0.572     -.034988    .0626345
 _Iyear_1984 |   .0041178   .0299885     0.14   0.891    -.0561159    .0643514
 _Iyear_1985 |   .0575169   .0452117     1.27   0.209    -.0332935    .1483273
 _Iyear_1986 |   .1073527   .0579004     1.85   0.070    -.0089437     .223649
 _Iyear_1987 |   .1240647   .0810099     1.53   0.132    -.0386485    .2867779
 _Iyear_1988 |   .1390924   .1025384     1.36   0.181    -.0668621    .3450468
 _Iyear_1989 |   .1702325   .1186812     1.43   0.158    -.0681457    .4086106
 _Iyear_1990 |   .1897753   .1358066     1.40   0.168    -.0830004     .462551
 _Iyear_1991 |   .2370697    .143986     1.65   0.106    -.0521347    .5262741
 _Iyear_1992 |   .2633971   .1598977     1.65   0.106     -.057767    .5845612
 _Iyear_1993 |   .2824192   .1717693     1.64   0.106    -.0625896    .6274279
 _Iyear_1994 |   .2983722   .1826111     1.63   0.109    -.0684131    .6651575
 _Iyear_1995 |   .2959081   .1946357     1.52   0.135    -.0950292    .6868454
 _Iyear_1996 |   .2875641   .2086531     1.38   0.174    -.1315281    .7066562
 _Iyear_1997 |   .2977352   .2209318     1.35   0.184    -.1460193    .7414896
   _Istate_2 |  -.1756765    .137504    -1.28   0.207    -.4518615    .1005084
   _Istate_3 |  -.2221958   .1558769    -1.43   0.160    -.5352837    .0908921
   _Istate_4 |   -.084915   .1180764    -0.72   0.475    -.3220784    .1522483
   _Istate_5 |  -.0164859   .0931025    -0.18   0.860    -.2034878     .170516
   _Istate_6 |  -.1905976   .0966401    -1.97   0.054     -.384705    .0035098
   _Istate_7 |  -.1896531   .1833995    -1.03   0.306    -.5580219    .1787157
   _Istate_8 |  -.1973043   .1925661    -1.02   0.310    -.5840846     .189476
   _Istate_9 |  -.1280651   .1325492    -0.97   0.339     -.394298    .1381677
  _Istate_10 |  -.1791013   .2064862    -0.87   0.390     -.593841    .2356385
  _Istate_11 |  -.2017399   .0890463    -2.27   0.028    -.3805946   -.0228852
  _Istate_12 |   .0233767   .1151764     0.20   0.840    -.2079619    .2547152
  _Istate_13 |  -.1415345   .1559403    -0.91   0.368    -.4547497    .1716808
  _Istate_14 |  -.2043592   .1003289    -2.04   0.047    -.4058757   -.0028428
  _Istate_15 |  -.1522498   .1225744    -1.24   0.220    -.3984477    .0939481
  _Istate_16 |  -.1673752   .1228003    -1.36   0.179    -.4140268    .0792764
  _Istate_17 |  -.1465226   .1286498    -1.14   0.260    -.4049233    .1118782
  _Istate_18 |  -.2186984   .1346072    -1.62   0.111     -.489065    .0516682
  _Istate_19 |    -.18281   .1027128    -1.78   0.081    -.3891147    .0234946
  _Istate_20 |  -.2437102   .1647207    -1.48   0.145    -.5745616    .0871412
  _Istate_21 |  -.0501152   .1254506    -0.40   0.691    -.3020902    .2018598
  _Istate_22 |  -.2430171   .1508651    -1.61   0.114    -.5460385    .0600043
  _Istate_23 |  -.1046723   .1132926    -0.92   0.360    -.3322272    .1228827
  _Istate_24 |  -.1682314   .1154668    -1.46   0.151    -.4001533    .0636906
  _Istate_25 |  -.1099258   .1389826    -0.79   0.433    -.3890806    .1692289
  _Istate_26 |  -.3492719   .1343077    -2.60   0.012    -.6190369    -.079507
  _Istate_27 |  -.0477431   .1334271    -0.36   0.722    -.3157392    .2202531
  _Istate_28 |   -.099044   .1300936    -0.76   0.450    -.3603447    .1622566
  _Istate_29 |  -.3091931   .1413721    -2.19   0.033    -.5931473   -.0252388
  _Istate_30 |  -.1548124   .1322405    -1.17   0.247    -.4204253    .1108005
  _Istate_31 |  -.1074939   .1225906    -0.88   0.385    -.3537243    .1387365
  _Istate_32 |  -.1571154   .1732687    -0.91   0.369    -.5051357    .1909049
  _Istate_33 |  -.0478893   .1122414    -0.43   0.671    -.2733327    .1775541
  _Istate_34 |  -.1326597   .1167591    -1.14   0.261    -.3671774    .1018579
  _Istate_35 |  -.1241203   .1558014    -0.80   0.429    -.4370567    .1888161
  _Istate_36 |  -.1489693   .1313673    -1.13   0.262    -.4128282    .1148897
  _Istate_37 |  -.2843925    .134892    -2.11   0.040    -.5553312   -.0134539
  _Istate_38 |  -.0760239   .1434907    -0.53   0.599    -.3642334    .2121855
  _Istate_39 |  -.1118006    .173708    -0.64   0.523    -.4607035    .2371022
  _Istate_40 |  -.2790959   .1624797    -1.72   0.092     -.605446    .0472542
  _Istate_41 |  -.1490303    .121125    -1.23   0.224     -.392317    .0942564
  _Istate_42 |  -.2696659   .1327644    -2.03   0.048    -.5363311   -.0030007
  _Istate_43 |  -.1654254   .1335338    -1.24   0.221    -.4336359    .1027851
  _Istate_44 |  -.0990137   .0805916    -1.23   0.225    -.2608868    .0628593
  _Istate_45 |  -.1416552   .0845265    -1.68   0.100    -.3114317    .0281212
  _Istate_46 |  -.0639255   .1147761    -0.56   0.580    -.2944601     .166609
  _Istate_47 |  -.1309635   .1230899    -1.06   0.292    -.3781969    .1162699
  _Istate_48 |   -.024428   .1136688    -0.21   0.831    -.2527385    .2038825
  _Istate_49 |  -.1284356   .1260573    -1.02   0.313    -.3816291    .1247579
  _Istate_50 |  -.2030722   .1818654    -1.12   0.269    -.5683595    .1622151
  _Istate_51 |  -.0781333   .0938978    -0.83   0.409    -.2667325    .1104659
       _cons |   -.747934     2.7482    -0.27   0.787    -6.267856    4.771988
------------------------------------------------------------------------------

. scalar chg = _b[primary]-_b[secondary]

. scalar effect = chg*sb_effect

. 
. /*  Finally, get the vehicle miles for NJ in 2000.
> **  Since this is not available, I use 1997 data.
> **  In 1997 there are about 63300 miles in NJ 
> */
. summarize vmt if state == "NJ" & year == 1997

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         vmt |         1       63308           .      63308      63308

. scalar NJ_effect = r(mean)*effect

. scalar list chg effect NJ_effect 
       chg =  .09707843
    effect = -.00036099
 NJ_effect = -22.853661

. 
. di "The switch has a estimated effect of " NJ_effect " on fatalities in New J
> ersey"
The switch has a estimated effect of -22.853661 on fatalities in New Jersey

. 
end of do-file

. log close
       log:  C:\Temp\web\class\5213\2008\HW_E10.2.log
  log type:  text
 closed on:  25 Nov 2008, 12:10:40
-------------------------------------------------------------------------------
