C8 Use the data in TRAFFIC2.RAW for this exercise.
Run an OLS regression of prcfat on a linear time trend, monthly dummy variables, and the variables wkends , unem , spdlaw , and beltlaw . Test the errors for AR(1) serial correlation using the regression in equation (12.14). Does it make sense to use the test that assumes strict exogeneity of the regressors?
Obtain serial correlation- and heteroskedasticity-robust standard errors for the coefficients on spdlaw and beltlaw , using four lags in the Newey-West estimator. How does this affect the statistical significance of the two policy variables?
Now, estimate the model using iterative Prais-Winsten and compare the estimates with the OLS estimates. Are there important changes in the policy variable coef- ficients or their statistical significance?
regprcfat t wkendsunemspdlawbeltlawfeb-dec
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.31 0.000 -.0030711 -.0013993
wkends | .0006259 .0061624 0.10 0.919 -.011615 .0128668
unem | -.0154259 .0055444 -2.78 0.007 -.0264392 -.0044127
spdlaw | .0670877 .0205683 3.26 0.002 .0262312 .1079441
beltlaw | -.0295053 .0232307 -1.27 0.207 -.0756503 .0166397
feb | .0008607 .0289967 0.03 0.976 -.0567377 .0584592
mar | .0000923 .0274069 0.00 0.997 -.0543481 .0545327
apr | .0582201 .0278195 2.09 0.039 .0029601 .11348
may | .0716392 .0276432 2.59 0.011 .0167293 .1265492
jun | .1012618 .0280937 3.60 0.001 .0454571 .1570665
jul | .1766121 .0272592 6.48 0.000 .122465 .2307592
aug | .1926117 .0274448 7.02 0.000 .1380959 .2471274
sep | .1600164 .028203 5.67 0.000 .1039947 .2160381
oct | .1010357 .0276702 3.65 0.000 .0460722 .1559991
nov | .013949 .0281436 0.50 0.621 -.0419548 .0698528
dec | .0092005 .027858 0.33 0.742 -.046136 .064537
_cons | 1.029799 .1029523 10.00 0.000 .8252964 1.234301
Higher speed limits are estimated to increase the percent of fatal accidents, by .067 percentage points. This is a statistically significant effect. The new seat belt law is estimated to decrease the percent of fatal accidents by about .03, but the two-sided p-value is about .21.
Interestingly, increased economic activity also increases the percent of fatal accidents. This may be because more commercial trucks are on the roads, and these probably increase the chance that an accident results in a fatality.
a.Test the errors for AR(1) serial correlation.
Here is how you could conduct the test using the Breusch-Godfrey method:After getting the OLS residuals, , run the regression (Included an intercept, but that is unimportant.)
tsset t
predict error, resid
reg error l.error
Source | SS df MS Number of obs = 107
-------------+------------------------------ F( 1, 105) = 8.91
Model | .023534599 1 .023534599 Prob> F = 0.0035
Residual | .277302016 105 .002640972 R-squared = 0.0782
-------------+------------------------------ Adj R-squared = 0.0695
Total | .300836614 106 .002838081 Root MSE = .05139
------------------------------------------------------------------------------
error | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
error |
L1. | .2816415 .0943463 2.99 0.004 .0945701 .4687129
_cons | .0002981 .0049684 0.06 0.952 -.0095533 .0101496
The coefficient on is .281 (se = .094). Thus, there is evidence of some positive serial correlation in the errors (t »2.99). Note that this test is only valid if there are no concerns about the endogeneity of the regressors. A strong case can be made that all explanatory variables are strictly exogenous. Certainly there is no concern about the time trend, the seasonal dummy variables, or wkends, as these are determined by the calendar. It is seems safe to assume that unexplained changes in prcfat today do not cause future changes in the state-wide unemployment rate. Also, over this period, the policy changes were permanent once they occurred, so strict exogeneity seems reasonable for spdlaw and beltlaw. (Given legislative lags, it seems unlikely that the dates the policies went into effect had anything to do with recent, unexplained changes in prcfat.
regD.prcfat t wkendsD.unemspdlawbeltlawfeb-dec
Source | SS df MS Number of obs = 107
-------------+------------------------------ F( 16, 90) = 2.94
Model | .213030831 16 .013314427 Prob> F = 0.0006
Residual | .406915412 90 .004521282 R-squared = 0.3436
-------------+------------------------------ Adj R-squared = 0.2269
Total | .619946244 106 .005848549 Root MSE = .06724
------------------------------------------------------------------------------
D.prcfat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
t | .0001433 .0004849 0.30 0.768 -.00082 .0011067
wkends | .0068097 .0072276 0.94 0.349 -.0075492 .0211685
unem |
D1. | .0125342 .0161094 0.78 0.439 -.01947 .0445385
spdlaw | -.0071825 .0237979 -0.30 0.763 -.0544612 .0400962
beltlaw | .0008251 .0265048 0.03 0.975 -.0518312 .0534814
feb | .0346228 .037046 0.93 0.352 -.0389755 .1082211
mar | .0419346 .0389248 1.08 0.284 -.0353964 .1192656
apr | .0985703 .0382988 2.57 0.012 .022483 .1746577
may | .0568102 .0374416 1.52 0.133 -.0175742 .1311946
jun | .0540339 .0347738 1.55 0.124 -.0150503 .1231182
jul | .0878394 .0331103 2.65 0.009 .02206 .1536187
aug | .0589255 .0396686 1.49 0.141 -.0198832 .1377342
sep | .0065431 .0379741 0.17 0.864 -.068899 .0819852
oct | -.0323897 .0352025 -0.92 0.360 -.1023255 .0375462
nov | -.0591083 .0354151 -1.67 0.099 -.1294666 .01125
dec | .0272794 .0363245 0.75 0.455 -.0448856 .0994445
_cons | -.126868 .1048114 -1.21 0.229 -.3350941 .0813581
This regression basically shows that the change in prcfat cannot be explained by the change in unem or any of the policy variables. It does have some seasonality, which is why the R-squared is .344.
我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=vkxijnpbuexk