Kong, Seok-kyu
Sun Nov 15 09:53:09 2015
“Francis Galton, the 19th century polymath, can be credited with discovering regression. He was particularly interested in the idea that the children of tall parents tended to be tall also, but a little shorter than their parents.” [reference: Regression Models for Data Science in R]
How would one fit a model that relates parent and child height?
We will assume a systematic component via a line and then independent and identically distributed Gaussian errors.
We can write the model out as:
\( Y_i = \beta_0 + \beta_1 X_i + \epsilon_i \)
library(UsingR)
# fitting linear model to galton data set
modFit <- lm(child ~ parent, data=galton)
plot(jitter(child) ~ parent, data=galton, xlab="Parent's height", ylab="Child's height")
lines(galton$parent, modFit$fitted.values)