powered by
A random sample of 50 students gift aid for students at Elmhurst College.
elmhurst
A data frame with 50 observations on the following 3 variables.
Family income of the student.
Gift aid, in $1000s.
Price paid by the student (tuition - gift aid).
library(ggplot2) library(broom) ggplot(elmhurst, aes(x = family_income, y = gift_aid)) + geom_point() + geom_smooth(method = "lm") mod <- lm(gift_aid ~ family_income, data = elmhurst) tidy(mod)
Run the code above in your browser using DataLab