Docstoc

Traffic Laws In California

Document Sample
Traffic Laws In California Powered By Docstoc
					Economics 823
Fall 2003

             ESTIMATING THE EFFECTS OF TRAFFIC LAWS IN CALIFORNIA


. use traffic2

. * Data are monthly for CA, 1981-1989.

. des totacc prcfat spdlaw beltlaw wkends

  2.   totacc    float   %9.0g                 statewide total accidents
 36.   prcfat    float   %9.0g                 100*(fatacc/totacc)
 20.   spdlaw    byte    %9.0g                 =1 after 65 mph in effect
 21.   beltlaw   byte    %9.0g                 =1 after seatbelt law
 22.   wkends    byte    %9.0g                 # weekends in month

. sum totacc prcfat spdlaw beltlaw wkends

Variable |     Obs        Mean   Std. Dev.       Min        Max
---------+-----------------------------------------------------
  totacc |     108    42831.26   4608.328      32699      52971
  prcfat |     108    .8856363   .0997777   .7016841   1.216828
  spdlaw |     108    .2962963   .4587521          0          1
 beltlaw |     108    .4444444   .4992206          0          1
  wkends |     108    13.07407   1.011187         12         15


. reg ltotacc t feb-dec wkends unem spdlaw beltlaw

  Source |       SS       df       MS                 Number of obs   =      108
---------+------------------------------              F( 16,    91)   =    57.61
   Model | 1.14490901     16 .071556813               Prob > F        =   0.0000
Residual | .113028469     91 .001242071               R-squared       =   0.9101
---------+------------------------------              Adj R-squared   =   0.8943
   Total | 1.25793748    107 .011756425               Root MSE        =   .03524

------------------------------------------------------------------------------
 ltotacc |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t |   .0011011   .0002579      4.270   0.000       .0005889    .0016133
     feb | -.0338346    .0177683     -1.904   0.060      -.0691292    .0014599
     mar |    .076953   .0167941      4.582   0.000       .0435937    .1103124
     apr |   .0104561   .0170469      0.613   0.541      -.0234054    .0443177
     may |   .0237074   .0169389      1.400   0.165      -.0099397    .0573544
     jun |   .0219334   .0172149      1.274   0.206       -.012262    .0561288
     jul |   .0499293   .0167036      2.989   0.004       .0167496    .0831089
     aug |   .0559526   .0168173      3.327   0.001        .022547    .0893581
     sep |   .0420693   .0172819      2.434   0.017        .007741    .0763977
     oct |   .0817171   .0169554      4.820   0.000       .0480372    .1153969
     nov |   .0768721   .0172455      4.458   0.000       .0426161    .1111282
     dec |   .0990863   .0170705      5.805   0.000       .0651779    .1329948
  wkends |   .0033333   .0037761      0.883   0.380      -.0041675    .0108342
    unem | -.0212173    .0033974     -6.245   0.000      -.0279659   -.0144688
  spdlaw | -.0537593    .0126036     -4.265   0.000      -.0787948   -.0287238
 beltlaw |   .0954528   .0142351      6.705   0.000       .0671766     .123729
   _cons |   10.63986    .063086    168.657   0.000       10.51455    10.76518
------------------------------------------------------------------------------

. * Substantial evidence of trend and seasonality in log(total accidents).

. reg ltotacc t feb-dec

  Source |       SS       df       MS                 Number of obs   =      108
---------+------------------------------              F( 12,    95)   =    31.06
   Model | 1.00244071     12 .083536726               Prob > F        =   0.0000
Residual | .255496765     95   .00268944              R-squared       =   0.7969
---------+------------------------------              Adj R-squared   =   0.7712
   Total | 1.25793748    107 .011756425               Root MSE        =   .05186

------------------------------------------------------------------------------
 ltotacc |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t |   .0027471   .0001611     17.057   0.000       .0024274    .0030669
     feb | -.0426865    .0244475     -1.746   0.084      -.0912208    .0058479
     mar |   .0798245   .0244491      3.265   0.002        .031287    .1283621
     apr |   .0184849   .0244517      0.756   0.452       -.030058    .0670277
     may |   .0320981   .0244554      1.313   0.193       -.016452    .0806483
     jun |   .0201918   .0244602      0.825   0.411      -.0283678    .0687515
     jul |   .0375826    .024466      1.536   0.128      -.0109886    .0861538
     aug |    .053983   .0244729      2.206   0.030       .0053981    .1025679
     sep |    .042361   .0244809      1.730   0.087      -.0062397    .0909617
     oct |   .0821135   .0244899      3.353   0.001       .0334949     .130732
     nov |   .0712785   .0244999      2.909   0.005         .02264    .1199171
     dec |   .0961572   .0245111      3.923   0.000       .0474966    .1448178
   _cons |   10.46857   .0190028    550.895   0.000       10.43084    10.50629
------------------------------------------------------------------------------

. predict ltotdt, resid

. reg ltotdt t feb-dec wkends unem spdlaw beltlaw

  Source |       SS       df       MS                 Number of obs   =      108
---------+------------------------------              F( 16,    91)   =     7.17
   Model | .142468297     16 .008904269               Prob > F        =   0.0000
Residual | .113028468     91 .001242071               R-squared       =   0.5576
---------+------------------------------              Adj R-squared   =   0.4798
   Total | .255496765    107   .00238782              Root MSE        =   .03524

------------------------------------------------------------------------------
  ltotdt |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t |   -.001646   .0002579     -6.383   0.000      -.0021582   -.0011338
     feb |   .0088518   .0177683      0.498   0.620      -.0264427    .0441463
     mar | -.0028715    .0167941     -0.171   0.865      -.0362309    .0304878
     apr | -.0080287    .0170469     -0.471   0.639      -.0418903    .0258328
     may | -.0083907    .0169389     -0.495   0.622      -.0420378    .0252563
     jun |   .0017416   .0172149      0.101   0.920      -.0324538    .0359369
     jul |   .0123467   .0167036      0.739   0.462       -.020833    .0455263
     aug |   .0019695   .0168173      0.117   0.907       -.031436    .0353751
     sep | -.0002917    .0172819     -0.017   0.987        -.03462    .0340367
     oct | -.0003964    .0169554     -0.023   0.981      -.0340762    .0332835
     nov |   .0055936   .0172455      0.324   0.746      -.0286625    .0398497


                                       2
     dec |   .0029292   .0170705      0.172   0.864      -.0309793    .0368376
  wkends |   .0033333   .0037761      0.883   0.380      -.0041675    .0108342
    unem | -.0212173    .0033974     -6.245   0.000      -.0279659   -.0144688
  spdlaw | -.0537593    .0126036     -4.265   0.000      -.0787948   -.0287238
 beltlaw |   .0954528   .0142351      6.705   0.000       .0671766     .123729
   _cons |   .1712963    .063086      2.715   0.008       .0459838    .2966088
------------------------------------------------------------------------------

. * The above R-squared nets out time trend and seasonality.

. * Now use percent of fatal accidents.

. reg prcfat t feb-dec wkends unem spdlaw beltlaw

  Source |       SS       df       MS                  Number of obs   =      108
---------+------------------------------               F( 16,    91)   =    14.44
   Model | .764228387     16 .047764274                Prob > F        =   0.0000
Residual | .301019769     91   .00330791               R-squared       =   0.7174
---------+------------------------------               Adj R-squared   =   0.6677
   Total | 1.06524816    107   .00995559               Root MSE        =   .05751

------------------------------------------------------------------------------
  prcfat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t | -.0022352    .0004208     -5.312   0.000      -.0030711   -.0013993
     feb |   .0008607   .0289967      0.030   0.976      -.0567377    .0584592
     mar |   .0000923   .0274069      0.003   0.997      -.0543481    .0545327
     apr |   .0582201   .0278195      2.093   0.039       .0029601      .11348
     may |   .0716392   .0276432      2.592   0.011       .0167293    .1265492
     jun |   .1012618   .0280937      3.604   0.001       .0454571    .1570665
     jul |   .1766121   .0272592      6.479   0.000        .122465    .2307592
     aug |   .1926117   .0274448      7.018   0.000       .1380959    .2471274
     sep |   .1600164    .028203      5.674   0.000       .1039947    .2160381
     oct |   .1010357   .0276702      3.651   0.000       .0460722    .1559991
     nov |    .013949   .0281436      0.496   0.621      -.0419548    .0698528
     dec |   .0092005    .027858      0.330   0.742       -.046136     .064537
  wkends |   .0006259   .0061624      0.102   0.919       -.011615    .0128668
    unem | -.0154259    .0055444     -2.782   0.007      -.0264392   -.0044127
  spdlaw |   .0670877   .0205683      3.262   0.002       .0262312    .1079441
 beltlaw | -.0295053    .0232307     -1.270   0.207      -.0756503    .0166397
   _cons |   1.029799   .1029523     10.003   0.000       .8252964    1.234301
------------------------------------------------------------------------------

. * Is there evidence of a unit root?

. corr prcfat prcfat_1
(obs=107)

        |   prcfat prcfat_1
--------+------------------
  prcfat|   1.0000
prcfat_1|   0.7086   1.0000

. * Could probably get by without worrying about it.

. * Test errors for AR(1) serial correlation.



                                          3
. predict uhat, resid

. gen uhat_1 = uhat[_n-1]
(1 missing value generated)

. reg uhat t feb-dec wkends unem spdlaw beltlaw uhat_1

  Source |       SS       df       MS                    Number of obs   =     107
---------+------------------------------                 F( 17,    89)   =    0.45
   Model | .023790487     17   .00139944                 Prob > F        = 0.9679
Residual | .277046128     89 .003112878                  R-squared       = 0.0791
---------+------------------------------                 Adj R-squared   = -0.0968
   Total | .300836614    106 .002838081                  Root MSE        = .05579

------------------------------------------------------------------------------
    uhat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t | -4.74e-06    .0004198     -0.011   0.991      -.0008389    .0008295
     feb | -.0022951    .0288332     -0.080   0.937       -.059586    .0549958
     mar | -.0035812    .0274681     -0.130   0.897      -.0581598    .0509974
     apr | -.0034468    .0279006     -0.124   0.902      -.0588846     .051991
     may | -.0038769    .0278556     -0.139   0.890      -.0592254    .0514716
     jun | -.0029804    .0281404     -0.106   0.916      -.0588947    .0529339
     jul | -.0036309    .0272526     -0.133   0.894      -.0577812    .0505194
     aug | -.0037892    .0275322     -0.138   0.891       -.058495    .0509166
     sep | -.0031717    .0282479     -0.112   0.911      -.0592996    .0529563
     oct | -.0038564    .0277567     -0.139   0.890      -.0590085    .0512956
     nov |   -.003127   .0281173     -0.111   0.912      -.0589955    .0527414
     dec | -.0036246    .0278795     -0.130   0.897      -.0590205    .0517713
  wkends |   .0010438   .0059921      0.174   0.862      -.0108623      .01295
    unem | -.0002877    .0054567     -0.053   0.958      -.0111301    .0105547
  spdlaw | -.0020536    .0200315     -0.103   0.919      -.0418557    .0377485
 beltlaw |   .0013077    .022552      0.058   0.954      -.0435026     .046118
  uhat_1 |   .2840267   .1028203      2.762   0.007       .0797249    .4883284
   _cons | -.0078366    .1011501     -0.077   0.938      -.2088197    .1931464
------------------------------------------------------------------------------

. * Not suprisingly, fairly strong evidence of positive serial correlation,
. * although the estimated coefficient is not huge.

. * Do Cochrane-Orcutt.

. corc prcfat   t feb-dec wkends unem spdlaw beltlaw
Iteration 0:    rho = 0.0000
Iteration 1:    rho = 0.2816
Iteration 2:    rho = 0.2875

(Cochrane-Orcutt regression)

  Source |       SS       df       MS                    Number of obs   =      107
---------+------------------------------                 F( 16,    90)   =     8.99
   Model | .442455235     16 .027653452                  Prob > F        =   0.0000
Residual | .276900749     90 .003076675                  R-squared       =   0.6151
---------+------------------------------                 Adj R-squared   =   0.5466
   Total | .719355984    106 .006786377                  Root MSE        =   .05547

------------------------------------------------------------------------------


                                         4
  prcfat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t | -.0021845     .000578     -3.779   0.000      -.0033328   -.0010362
     feb | -.0018534    .0250271     -0.074   0.941       -.051574    .0478673
     mar | -.0025314    .0273062     -0.093   0.926        -.05678    .0517171
     apr |   .0560187   .0287841      1.946   0.055       -.001166    .1132033
     may |   .0701407   .0292602      2.397   0.019       .0120103    .1282711
     jun |   .0991675   .0292703      3.388   0.001       .0410169    .1573182
     jul |   .1734162   .0282705      6.134   0.000       .1172519    .2295805
     aug |   .1904482   .0287458      6.625   0.000       .1333396    .2475568
     sep |   .1583579   .0295062      5.367   0.000       .0997387    .2169771
     oct |   .0992805    .028842      3.442   0.001       .0419809    .1565801
     nov |   .0119549   .0282804      0.423   0.674      -.0442289    .0681388
     dec |   .0074087   .0253512      0.292   0.771      -.0429559    .0577732
  wkends |   .0006308   .0050348      0.125   0.901      -.0093718    .0106333
    unem | -.0135121    .0073114     -1.848   0.068      -.0280376    .0010133
  spdlaw |   .0647169   .0270467      2.393   0.019       .0109839    .1184499
 beltlaw | -.0245669    .0302612     -0.812   0.419      -.0846861    .0355523
   _iter |   1.014083   .1054508      9.617   0.000       .8045867     1.22358
------------------------------------------------------------------------------
     rho |     0.2878     0.0937      3.070   0.003         0.1019      0.4736
------------------------------------------------------------------------------

. * Rather than use feasible GLS, use OLS and adjust the standard errors and
. * test statistics -- see Section 12.5 in text.


. tis t

. newey prcfat t feb-dec wkends unem spdlaw beltlaw, lag(1)

Regression with Newey-West standard errors         Number of obs   =      108
maximum lag : 1                                    F( 16,    91)   =    14.51
                                                   Prob > F        =   0.0000

------------------------------------------------------------------------------
         |             Newey-West
  prcfat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t | -.0022352    .0005209     -4.291   0.000      -.0032699   -.0012005
     feb |   .0008607   .0213993      0.040   0.968      -.0416462    .0433677
     mar |   .0000923   .0262597      0.004   0.997      -.0520693    .0522539
     apr |   .0582201   .0274468      2.121   0.037       .0037005    .1127397
     may |   .0716392   .0287959      2.488   0.015       .0144397    .1288387
     jun |   .1012618   .0313524      3.230   0.002       .0389841    .1635396
     jul |   .1766121   .0351061      5.031   0.000        .106878    .2463461
     aug |   .1926117   .0254568      7.566   0.000       .1420448    .2431785
     sep |   .1600164   .0296359      5.399   0.000       .1011484    .2188844
     oct |   .1010357   .0308908      3.271   0.002       .0396748    .1623965
     nov |    .013949   .0301182      0.463   0.644       -.045877     .073775
     dec |   .0092005   .0275672      0.334   0.739      -.0455584    .0639594
  wkends |   .0006259   .0055163      0.113   0.910      -.0103316    .0115833
    unem | -.0154259    .0069182     -2.230   0.028       -.029168   -.0016838
  spdlaw |   .0670877   .0220618      3.041   0.003       .0232646    .1109107
 beltlaw | -.0295053     .027655     -1.067   0.289      -.0844386     .025428
   _cons |   1.029799   .1007553     10.221   0.000       .8296605    1.229937
------------------------------------------------------------------------------


                                       5
. * Now try four lags:

. newey prcfat t feb-dec wkends unem spdlaw beltlaw, lag(4)

Regression with Newey-West standard errors           Number of obs   =          108
maximum lag : 4                                      F( 16,    91)   =        21.82
                                                     Prob > F        =       0.0000

------------------------------------------------------------------------------
         |             Newey-West
  prcfat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t | -.0022352    .0005586     -4.001   0.000      -.0033449   -.0011256
     feb |   .0008607    .016912      0.051   0.960      -.0327328    .0344543
     mar |   .0000923   .0226938      0.004   0.997      -.0449863    .0451708
     apr |   .0582201   .0259827      2.241   0.027       .0066087    .1098314
     may |   .0716392   .0287458      2.492   0.015       .0145393    .1287392
     jun |   .1012618    .031498      3.215   0.002       .0386949    .1638288
     jul |   .1766121   .0347057      5.089   0.000       .1076735    .2455507
     aug |   .1926117   .0250918      7.676   0.000       .1427699    .2424534
     sep |   .1600164   .0295256      5.420   0.000       .1013674    .2186653
     oct |   .1010357   .0308938      3.270   0.002       .0396688    .1624025
     nov |    .013949   .0309023      0.451   0.653      -.0474346    .0753326
     dec |   .0092005   .0285123      0.323   0.748      -.0474357    .0658367
  wkends |   .0006259   .0051619      0.121   0.904      -.0096276    .0108793
    unem | -.0154259    .0060176     -2.563   0.012      -.0273791   -.0034728
  spdlaw |   .0670877    .026705      2.512   0.014       .0140415    .1201338
 beltlaw | -.0295053    .0331285     -0.891   0.375       -.095311    .0363004
   _cons |   1.029799   .0937611     10.983   0.000       .8435536    1.216043
------------------------------------------------------------------------------

. * Do things change if we first difference the dependent variable?

. gen cprcfat = prcfat - prcfat_1
(1 missing value generated)

. reg cprcfat t feb-dec wkends unem spdlaw beltlaw

  Source |       SS       df       MS                  Number of obs     =      107
---------+------------------------------               F( 16,    90)     =     2.89
   Model | .210430802     16 .013151925                Prob > F          =   0.0008
Residual | .409515442     90 .004550172                R-squared         =   0.3394
---------+------------------------------               Adj R-squared     =   0.2220
   Total | .619946244    106 .005848549                Root MSE          =   .06745

------------------------------------------------------------------------------
 cprcfat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t |   .0000627   .0005075      0.124   0.902      -.0009455     .001071
     feb |   .0244511   .0348588      0.701   0.485       -.044802    .0937042
     mar |   .0251174   .0332006      0.757   0.451      -.0408415    .0910762
     apr |   .0825839   .0337253      2.449   0.016       .0155827    .1495851
     may |   .0415684   .0336679      1.235   0.220      -.0253188    .1084556
     jun |   .0459573   .0340187      1.351   0.180      -.0216268    .1135413
     jul |   .0841456   .0329385      2.555   0.012       .0187075    .1495838
     aug |   .0407365   .0332761      1.224   0.224      -.0253724    .1068454
     sep | -.0087027    .0341474     -0.255   0.799      -.0765425    .0591372


                                       6
     oct | -.0433415    .0335472     -1.292   0.200      -.1099888    .0233057
     nov | -.0691784    .0339892     -2.035   0.045       -.136704   -.0016529
     dec |   .0144048   .0336975      0.427   0.670      -.0525412    .0813507
  wkends |   .0063772   .0072316      0.882   0.380      -.0079895     .020744
    unem | -.0011452    .0065972     -0.174   0.863      -.0142517    .0119613
  spdlaw | -.0064538    .0241944     -0.267   0.790      -.0545203    .0416126
 beltlaw |   .0013225   .0272615      0.049   0.961      -.0528372    .0554822
   _cons | -.0977986    .1221805     -0.800   0.426      -.3405315    .1449343
------------------------------------------------------------------------------

. * If we difference the dependent variable, nothing of interest is
. * significant.

. * An alternative is to use add a lagged dependent variable.

. reg prcfat t feb-dec wkends unem spdlaw beltlaw prcfat_1

  Source |       SS       df       MS                 Number of obs   =      107
---------+------------------------------              F( 17,    89)   =    15.23
   Model | .792619379     17 .046624669               Prob > F        =   0.0000
Residual | .272390842     89 .003060571               R-squared       =   0.7442
---------+------------------------------              Adj R-squared   =   0.6954
   Total | 1.06501022    106 .010047266               Root MSE        =   .05532

------------------------------------------------------------------------------
  prcfat |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
       t | -.0015343    .0004798     -3.198   0.002      -.0024876    -.000581
     feb |   .0070821   .0287066      0.247   0.806      -.0499573    .0641215
     mar |    .006663   .0273684      0.243   0.808      -.0477174    .0610433
     apr |   .0645501   .0277903      2.323   0.022       .0093313    .1197689
     may |   .0608603   .0277624      2.192   0.031        .005697    .1160235
     jun |   .0826831   .0284344      2.908   0.005       .0261844    .1391817
     jul |   .1464905   .0285748      5.127   0.000       .0897129     .203268
     aug |     .14383   .0313372      4.590   0.000       .0815636    .2060964
     sep |   .1059597   .0328293      3.228   0.002       .0407286    .1711908
     oct |   .0545901   .0311615      1.752   0.083      -.0073272    .1165074
     nov |   -.013279      .0291     -0.456   0.649      -.0711001     .044542
     dec |    .009581    .027646      0.347   0.730       -.045351    .0645131
  wkends |   .0024614   .0059597      0.413   0.681      -.0093803    .0143031
    unem | -.0111274    .0056124     -1.983   0.050      -.0222791    .0000243
  spdlaw |    .044365   .0212457      2.088   0.040       .0021503    .0865797
 beltlaw | -.0197228    .0225782     -0.874   0.385      -.0645852    .0251395
prcfat_1 |   .3127916   .1026673      3.047   0.003       .1087939    .5167892
   _cons |    .679919   .1534306      4.431   0.000       .3750557    .9847824
------------------------------------------------------------------------------

. * spdlaw is still marginally significant.




                                       7

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:8
posted:7/12/2009
language:English
pages:7