- Connect the lecture idea of a line of best fit to R code.
- Fit a simple linear regression with
lm(). - Extract coefficients with
coef()and residual SD withsigma(). - Use coefficients to calculate predicted means by hand.
- Use
predict()for simple and multiple regression predictions.
Check the online lecture before the workshop. Complete the Week 5 problem set after this workshop.