Earnings | R Documentation |
Data from a survey of adult Americans in 1994.
Earnings
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).
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).
http://www.stat.columbia.edu/~gelman/arm/software/
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).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.