Data for Exercise 2.14, 2.17, 2.31, 2.33, and 2.40
Jdpower
A data frame with 29 observations on the following 3 variables.
Car
a factor with levels Acura
BMW
Buick
Cadillac
Chevrolet
Dodge
Eagle
Ford
Geo
Honda
Hyundai
Infiniti
Jaguar
Lexus
Lincoln
Mazda
Mercedes-Benz
Mercury
Mitsubishi
Nissan
Oldsmobile
Plymouth
Pontiac
Saab
Saturn
Subaru
Toyota
Volkswagen
Volvo
X1994
a numeric vector
X1995
a numeric vector
# NOT RUN {
str(Jdpower)
attach(Jdpower)
plot(X1994,X1995)
model <- lm(X1995~X1994)
abline(model)
model
cor(X1995,X1994)
detach(Jdpower)
# }
Run the code above in your browser using DataLab