1\name{USGasG}
2\alias{USGasG}
3\title{US Gasoline Market Data (1960--1995, Greene)}
4\description{
5Time series data on the US gasoline market.
6}
7\usage{data("USGasG")}
8\format{
9An annual multiple time series from 1960 to 1995 with 10 variables.
10 \describe{
11    \item{gas}{Total US gasoline consumption (computed as
12      total expenditure divided by price index).}
13    \item{price}{Price index for gasoline.}
14    \item{income}{Per capita disposable income.}
15    \item{newcar}{Price index for new cars.}
16    \item{usedcar}{Price index for used cars.}
17    \item{transport}{Price index for public transportation.}
18    \item{durable}{Aggregate price index for consumer durables.}
19    \item{nondurable}{Aggregate price index for consumer nondurables.}
20    \item{service}{Aggregate price index for consumer services.}
21    \item{population}{US total population in millions.}
22 }
23}
24
25\source{
26Online complements to Greene (2003). Table F2.2.
27
28\url{http://pages.stern.nyu.edu/~wgreene/Text/tables/tablelist5.htm}
29}
30
31\references{
32Greene, W.H. (2003). \emph{Econometric Analysis}, 5th edition. Upper Saddle River, NJ: Prentice Hall.
33}
34
35\seealso{\code{\link{Greene2003}}, \code{\link{USGasB}}}
36
37\examples{
38data("USGasG", package = "AER")
39plot(USGasG)
40
41## Greene (2003)
42## Example 2.3
43fm <- lm(log(gas/population) ~ log(price) + log(income) + log(newcar) + log(usedcar),
44  data = as.data.frame(USGasG))
45summary(fm)
46
47## Example 4.4
48## estimates and standard errors (note different offset for intercept)
49coef(fm)
50sqrt(diag(vcov(fm)))
51## confidence interval
52confint(fm, parm = "log(income)")
53## test linear hypothesis
54linearHypothesis(fm, "log(income) = 1")
55
56## Example 7.6
57## re-used in Example 8.3
58trend <- 1:nrow(USGasG)
59shock <- factor(time(USGasG) > 1973, levels = c(FALSE, TRUE),
60  labels = c("before", "after"))
61
62## 1960-1995
63fm1 <- lm(log(gas/population) ~ log(income) + log(price) + log(newcar) +
64  log(usedcar) + trend, data = as.data.frame(USGasG))
65summary(fm1)
66## pooled
67fm2 <- lm(log(gas/population) ~ shock + log(income) + log(price) + log(newcar) +
68  log(usedcar) + trend, data = as.data.frame(USGasG))
69summary(fm2)
70## segmented
71fm3 <- lm(log(gas/population) ~ shock/(log(income) + log(price) + log(newcar) +
72  log(usedcar) + trend), data = as.data.frame(USGasG))
73summary(fm3)
74
75## Chow test
76anova(fm3, fm1)
77library("strucchange")
78sctest(log(gas/population) ~ log(income) + log(price) + log(newcar) +
79  log(usedcar) + trend, data = USGasG, point = c(1973, 1), type = "Chow")
80## Recursive CUSUM test
81rcus <- efp(log(gas/population) ~ log(income) + log(price) + log(newcar) +
82  log(usedcar) + trend, data = USGasG, type = "Rec-CUSUM")
83plot(rcus)
84sctest(rcus)
85## Note: Greene's remark that the break is in 1984 (where the process crosses its
86## boundary) is wrong. The break appears to be no later than 1976.
87
88## More examples can be found in:
89## help("Greene2003")
90}
91
92\keyword{datasets}
93