table.b3 | R Documentation |
The table.b3
data frame has observations on gasoline
mileage performance for 32 different automobiles.
data(table.b3)
This data frame contains the following columns:
Miles/gallon
Displacement (cubic in)
Horsepower (ft-lb)
Torque (ft-lb)
Compression ratio
Rear axle ratio
Carburetor (barrels)
No. of transmission speeds
Overall length (in)
Width (in)
Weight (lb)
Type of transmission (1=automatic, 0=manual)
Montgomery, D.C., Peck, E.A., and Vining, C.G. (2001) Introduction to Linear Regression Analysis. 3rd Edition, John Wiley and Sons.
Motor Trend, 1975
data(table.b3)
attach(table.b3)
y.lm <- lm(y ~ x1 + x6)
summary(y.lm)
# testing for the significance of the regression:
y.null <- lm(y ~ 1)
anova(y.null, y.lm)
# 95% CI for mean gas mileage:
predict(y.lm, newdata=data.frame(x1=275, x6=2), interval="confidence")
# 95% PI for gas mileage:
predict(y.lm, newdata=data.frame(x1=275, x6=2), interval="prediction")
detach(table.b3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.