US Traffic Fatalities
Fatalities.RdUS traffic fatalities panel data for the “lower 48” US states (i.e., excluding Alaska and Hawaii), annually for 1982 through 1988.
Usage
data("Fatalities")Format
A data frame containing 336 observations on 34 variables.
- state
factor indicating state.
- year
factor indicating year.
- spirits
numeric. Spirits consumption.
- unemp
numeric. Unemployment rate.
- income
numeric. Per capita personal income in 1987 dollars.
- emppop
numeric. Employment/population ratio.
- beertax
numeric. Tax on case of beer.
- baptist
numeric. Percent of southern baptist.
- mormon
numeric. Percent of mormon.
- drinkage
numeric. Minimum legal drinking age.
- dry
numeric. Percent residing in “dry” countries.
- youngdrivers
numeric. Percent of drivers aged 15–24.
- miles
numeric. Average miles per driver.
- breath
factor. Preliminary breath test law?
- jail
factor. Mandatory jail sentence?
- service
factor. Mandatory community service?
- fatal
numeric. Number of vehicle fatalities.
- nfatal
numeric. Number of night-time vehicle fatalities.
- sfatal
numeric. Number of single vehicle fatalities.
- fatal1517
numeric. Number of vehicle fatalities, 15–17 year olds.
- nfatal1517
numeric. Number of night-time vehicle fatalities, 15–17 year olds.
- fatal1820
numeric. Number of vehicle fatalities, 18–20 year olds.
- nfatal1820
numeric. Number of night-time vehicle fatalities, 18–20 year olds.
- fatal2124
numeric. Number of vehicle fatalities, 21–24 year olds.
- nfatal2124
numeric. Number of night-time vehicle fatalities, 21–24 year olds.
- afatal
numeric. Number of alcohol-involved vehicle fatalities.
- pop
numeric. Population.
- pop1517
numeric. Population, 15–17 year olds.
- pop1820
numeric. Population, 18–20 year olds.
- pop2124
numeric. Population, 21–24 year olds.
- milestot
numeric. Total vehicle miles (millions).
- unempus
numeric. US unemployment rate.
- emppopus
numeric. US employment/population ratio.
- gsp
numeric. GSP rate of change.
Details
Traffic fatalities are from the US Department of Transportation Fatal Accident Reporting System. The beer tax is the tax on a case of beer, which is an available measure of state alcohol taxes more generally. The drinking age variable is a factor indicating whether the legal drinking age is 18, 19, or 20. The two binary punishment variables describe the state's minimum sentencing requirements for an initial drunk driving conviction.
Total vehicle miles traveled annually by state was obtained from the Department of Transportation. Personal income was obtained from the US Bureau of Economic Analysis, and the unemployment rate was obtained from the US Bureau of Labor Statistics.
References
Ruhm, C. J. (1996). Alcohol Policies and Highway Vehicle Fatalities. Journal of Health Economics, 15, 435–454.
Stock, J. H. and Watson, M. W. (2007). Introduction to Econometrics, 2nd ed. Boston: Addison Wesley.
Examples
## data from Stock and Watson (2007)
data("Fatalities", package = "AER")
## add fatality rate (number of traffic deaths
## per 10,000 people living in that state in that year)
Fatalities$frate <- with(Fatalities, fatal/pop * 10000)
## add discretized version of minimum legal drinking age
Fatalities$drinkagec <- cut(Fatalities$drinkage,
breaks = 18:22, include.lowest = TRUE, right = FALSE)
Fatalities$drinkagec <- relevel(Fatalities$drinkagec, ref = 4)
## any punishment?
Fatalities$punish <- with(Fatalities,
factor(jail == "yes" | service == "yes", labels = c("no", "yes")))
## plm package
library("plm")
## for comparability with Stata we use HC1 below
## p. 351, Eq. (10.2)
f1982 <- subset(Fatalities, year == "1982")
fm_1982 <- lm(frate ~ beertax, data = f1982)
coeftest(fm_1982, vcov = vcovHC(fm_1982, type = "HC1"))
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 2.01038 0.14957 13.4408 <2e-16 ***
#> beertax 0.14846 0.13261 1.1196 0.2687
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## p. 353, Eq. (10.3)
f1988 <- subset(Fatalities, year == "1988")
fm_1988 <- lm(frate ~ beertax, data = f1988)
coeftest(fm_1988, vcov = vcovHC(fm_1988, type = "HC1"))
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 1.85907 0.11461 16.2205 < 2.2e-16 ***
#> beertax 0.43875 0.12786 3.4314 0.001279 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## pp. 355, Eq. (10.8)
fm_diff <- lm(I(f1988$frate - f1982$frate) ~ I(f1988$beertax - f1982$beertax))
coeftest(fm_diff, vcov = vcovHC(fm_diff, type = "HC1"))
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) -0.072037 0.065355 -1.1022 0.276091
#> I(f1988$beertax - f1982$beertax) -1.040973 0.355006 -2.9323 0.005229 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## pp. 360, Eq. (10.15)
## (1) via formula
fm_sfe <- lm(frate ~ beertax + state - 1, data = Fatalities)
## (2) by hand
fat <- with(Fatalities,
data.frame(frates = frate - ave(frate, state),
beertaxs = beertax - ave(beertax, state)))
fm_sfe2 <- lm(frates ~ beertaxs - 1, data = fat)
## (3) via plm()
fm_sfe3 <- plm(frate ~ beertax, data = Fatalities,
index = c("state", "year"), model = "within")
coeftest(fm_sfe, vcov = vcovHC(fm_sfe, type = "HC1"))[1,]
#> Estimate Std. Error t value Pr(>|t|)
#> -0.655873722 0.203279719 -3.226459220 0.001398372
## uses different df in sd and p-value
coeftest(fm_sfe2, vcov = vcovHC(fm_sfe2, type = "HC1"))[1,]
#> Estimate Std. Error t value Pr(>|t|)
#> -0.655873722 0.188153627 -3.485841496 0.000555894
## uses different df in p-value
coeftest(fm_sfe3, vcov = vcovHC(fm_sfe3, type = "HC1", method = "white1"))[1,]
#> Estimate Std. Error t value Pr(>|t|)
#> -0.6558737222 0.1881536274 -3.4858414958 0.0005673213
## pp. 363, Eq. (10.21)
## via lm()
fm_stfe <- lm(frate ~ beertax + state + year - 1, data = Fatalities)
coeftest(fm_stfe, vcov = vcovHC(fm_stfe, type = "HC1"))[1,]
#> Estimate Std. Error t value Pr(>|t|)
#> -0.6399800 0.2547149 -2.5125346 0.0125470
## via plm()
fm_stfe2 <- plm(frate ~ beertax, data = Fatalities,
index = c("state", "year"), model = "within", effect = "twoways")
coeftest(fm_stfe2, vcov = vcovHC) ## different
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -0.63998 0.34963 -1.8305 0.06824 .
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## p. 368, Table 10.1, numbers refer to cols.
fm1 <- plm(frate ~ beertax, data = Fatalities, index = c("state", "year"), model = "pooling")
fm2 <- plm(frate ~ beertax, data = Fatalities, index = c("state", "year"), model = "within")
fm3 <- plm(frate ~ beertax, data = Fatalities, index = c("state", "year"), model = "within",
effect = "twoways")
fm4 <- plm(frate ~ beertax + drinkagec + jail + service + miles + unemp + log(income),
data = Fatalities, index = c("state", "year"), model = "within", effect = "twoways")
fm5 <- plm(frate ~ beertax + drinkagec + jail + service + miles,
data = Fatalities, index = c("state", "year"), model = "within", effect = "twoways")
fm6 <- plm(frate ~ beertax + drinkage + punish + miles + unemp + log(income),
data = Fatalities, index = c("state", "year"), model = "within", effect = "twoways")
fm7 <- plm(frate ~ beertax + drinkagec + jail + service + miles + unemp + log(income),
data = Fatalities, index = c("state", "year"), model = "within", effect = "twoways")
## summaries not too close, s.e.s generally too small
coeftest(fm1, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 1.85331 0.11710 15.8263 < 2.2e-16 ***
#> beertax 0.36461 0.11826 3.0832 0.002218 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
coeftest(fm2, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -0.65587 0.28837 -2.2744 0.02368 *
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
coeftest(fm3, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -0.63998 0.34963 -1.8305 0.06824 .
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
coeftest(fm4, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -4.4895e-01 2.8850e-01 -1.5562 0.120828
#> drinkagec[18,19) 2.8149e-02 6.8014e-02 0.4139 0.679299
#> drinkagec[19,20) -1.8550e-02 4.8162e-02 -0.3852 0.700416
#> drinkagec[20,21) 3.1375e-02 4.8744e-02 0.6437 0.520323
#> jailyes 1.3058e-02 1.6115e-02 0.8103 0.418458
#> serviceyes 3.3446e-02 1.2873e-01 0.2598 0.795197
#> miles 8.2275e-06 6.6313e-06 1.2407 0.215785
#> unemp -6.3111e-02 1.2615e-02 -5.0028 1.015e-06 ***
#> log(income) 1.8146e+00 6.1659e-01 2.9429 0.003532 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
coeftest(fm5, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -7.0442e-01 3.3804e-01 -2.0838 0.03810 *
#> drinkagec[18,19) -1.1360e-02 8.0764e-02 -0.1407 0.88825
#> drinkagec[19,20) -7.8033e-02 6.5591e-02 -1.1897 0.23520
#> drinkagec[20,21) -1.0224e-01 5.4695e-02 -1.8692 0.06266 .
#> jailyes -2.5965e-02 1.8624e-02 -1.3942 0.16439
#> serviceyes 1.4690e-01 1.3970e-01 1.0515 0.29395
#> miles 1.7372e-05 1.0221e-05 1.6996 0.09033 .
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
coeftest(fm6, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -4.5647e-01 2.9809e-01 -1.5313 0.126845
#> drinkage -2.1567e-03 2.0908e-02 -0.1032 0.917916
#> punishyes 3.8981e-02 1.0023e-01 0.3889 0.697636
#> miles 8.9787e-06 6.8958e-06 1.3020 0.193991
#> unemp -6.2694e-02 1.2854e-02 -4.8776 1.82e-06 ***
#> log(income) 1.7864e+00 6.2511e-01 2.8578 0.004592 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
coeftest(fm7, vcov = vcovHC)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> beertax -4.4895e-01 2.8850e-01 -1.5562 0.120828
#> drinkagec[18,19) 2.8149e-02 6.8014e-02 0.4139 0.679299
#> drinkagec[19,20) -1.8550e-02 4.8162e-02 -0.3852 0.700416
#> drinkagec[20,21) 3.1375e-02 4.8744e-02 0.6437 0.520323
#> jailyes 1.3058e-02 1.6115e-02 0.8103 0.418458
#> serviceyes 3.3446e-02 1.2873e-01 0.2598 0.795197
#> miles 8.2275e-06 6.6313e-06 1.2407 0.215785
#> unemp -6.3111e-02 1.2615e-02 -5.0028 1.015e-06 ***
#> log(income) 1.8146e+00 6.1659e-01 2.9429 0.003532 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## TODO: Testing exclusion restrictions