Compute a linear model in R
Learning objectives
- Practice using R to find the best fit model
- \(R^2\) is the square of the correlation coefficient.
- Always report and interpret \(R^2\), which reports the fraction of the variation of y accounted for by the linear model.