7 Regression

Learning Objectives

  • Check model assumptions for valid regression inference
  • Test for overall goodness of fit
  • Test individual parameter estimates for linear model
  • Generate and plot confidence and prediction intervals
  • Evaluate the possible influence of outliers

Useful Functions

  • confint() to generate confidence intervals for parameter estimates
  • predict() to generate confidence and prediction intervals for new points at specific values of \(X\)
  • DrawBand() to draw confidence and prediction intervals on scatter plots

New packages to install

  • car (for the Boxplot function)
  • reshape (for data manipulation)
install.packages(c("car","reshape"))