Cigarette Consumption Panel Data
CigarettesSW.RdPanel data on cigarette consumption for the 48 continental US States from 1985–1995.
Usage
data("CigarettesSW")Format
A data frame containing 48 observations on 7 variables for 2 periods.
- state
Factor indicating state.
- year
Factor indicating year.
- cpi
Consumer price index.
- population
State population.
- packs
Number of packs per capita.
- income
State personal income (total, nominal).
- tax
Average state, federal and average local excise taxes for fiscal year.
- price
Average price during fiscal year, including sales tax.
- taxs
Average excise taxes for fiscal year, including sales tax.
References
Stock, J.H. and Watson, M.W. (2007). Introduction to Econometrics, 2nd ed. Boston: Addison Wesley.
Examples
## Stock and Watson (2007)
## data and transformations
data("CigarettesSW")
CigarettesSW <- transform(CigarettesSW,
rprice = price/cpi,
rincome = income/population/cpi,
rtax = tax/cpi,
rtdiff = (taxs - tax)/cpi
)
c1985 <- subset(CigarettesSW, year == "1985")
c1995 <- subset(CigarettesSW, year == "1995")
## convenience function: HC1 covariances
hc1 <- function(x) vcovHC(x, type = "HC1")
## Equations 12.9--12.11
fm_s1 <- lm(log(rprice) ~ rtdiff, data = c1995)
coeftest(fm_s1, vcov = hc1)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 4.6165463 0.0289177 159.6444 < 2.2e-16 ***
#> rtdiff 0.0307289 0.0048354 6.3549 8.489e-08 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
fm_s2 <- lm(log(packs) ~ fitted(fm_s1), data = c1995)
fm_ivreg <- ivreg(log(packs) ~ log(rprice) | rtdiff, data = c1995)
coeftest(fm_ivreg, vcov = hc1)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 9.71988 1.52832 6.3598 8.346e-08 ***
#> log(rprice) -1.08359 0.31892 -3.3977 0.001411 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## Equation 12.15
fm_ivreg2 <- ivreg(log(packs) ~ log(rprice) + log(rincome) | log(rincome) + rtdiff, data = c1995)
coeftest(fm_ivreg2, vcov = hc1)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 9.43066 1.25939 7.4883 1.935e-09 ***
#> log(rprice) -1.14338 0.37230 -3.0711 0.003611 **
#> log(rincome) 0.21452 0.31175 0.6881 0.494917
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## Equation 12.16
fm_ivreg3 <- ivreg(log(packs) ~ log(rprice) + log(rincome) | log(rincome) + rtdiff + rtax,
data = c1995)
coeftest(fm_ivreg3, vcov = hc1)
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 9.89496 0.95922 10.3157 1.947e-13 ***
#> log(rprice) -1.27742 0.24961 -5.1177 6.211e-06 ***
#> log(rincome) 0.28040 0.25389 1.1044 0.2753
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
## More examples can be found in:
## help("StockWatson2007")