Earnings {R4HCR} | R Documentation |
Gelman and Hill's Earnings and Height Data.
Description
Data from a survey of adult Americans in 1994.
Usage
Earnings
Format
A data frame with 1192 observations on the following 4 variables.
earn
Annual earnings (in dollars).
sex
Sex (
1
= men,2
= women).yearbn
Year of birth.
height
Height (in inches).
Details
This is a subset of the data was used in a number of regression examples in Data analysis using regression and multilevel/hierarchical models by Gelman and Hill (2006).
Source
http://www.stat.columbia.edu/~gelman/arm/software/
References
Gelman, Andrew, and Jennifer Hill. Data Analysis Using Regression and Multilevel/Hierarchical models. Cambridge university press, 2006.
Persico, Nicola, Andrew Postlewaite, and Dan Silverman. "The effect of adolescent experience on labor market outcomes: the case of height (No. w10522)." (2004).
Examples
data(Earnings, package = "R4HCR")
mod <- lm(earn ~ height, data = Earnings)
# % variation explained
summary(mod)$adj.r.squared
# regression coefficients.
coef(mod)
# log earnings model
logm <- lm(I(log(earn)) ~ height, data = Earnings)
coef(logm)
[Package R4HCR version 0.1 Index]