| longley {datasets} | R Documentation |
Longley's Economic Regression Data
Description
A macroeconomic data set which provides a well-known example for a highly collinear regression.
Usage
longley
Format
A data frame with 7 economical variables, observed yearly from 1947 to
1962 (n=16).
GNP.deflatorGNP implicit price deflator (
1954=100)GNPGross National Product.
Unemployednumber of unemployed.
Armed.Forcesnumber of people in the armed forces.
Population‘noninstitutionalized’ population
\ge14 years of age.Yearthe year (time).
Employednumber of people employed.
The regression lm(Employed ~ .) is known to be highly
collinear.
Source
Longley JW (1967). “An Appraisal of Least Squares Programs for the Electronic Computer from the Point of View of the User.” Journal of the American Statistical Association, 62(319), 819–841. doi:10.1080/01621459.1967.10500896.
References
Becker RA, Chambers JM, Wilks AR (1988). The New S Language. Chapman and Hall/CRC, London. ISBN 053409192X.
Examples
require(stats); require(graphics)
## give the data set in the form it was used in S-PLUS:
longley.x <- data.matrix(longley[, 1:6])
longley.y <- longley[, "Employed"]
pairs(longley, main = "longley data")
summary(fm1 <- lm(Employed ~ ., data = longley))
opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
mar = c(4.1, 4.1, 2.1, 1.1))
plot(fm1)
par(opar)