Chapter 5 Multiple Linear Regression

In this chapter, you will learn how to:

  • Write and interpret a multiple linear regression equation;
  • Examine variables prior to including them in a regression model;
  • Fit a multiple linear regression model;
  • Interpret the estimated regression coefficients;
  • Distinguish between confounders, mediators, and moderators;
  • Test and visualize interactions between predictors;
  • Obtain predictions from the model;
  • Compute three types of confidence or prediction intervals;
  • Diagnose the fit of the model;
  • Adjust the model to improve the fit, if needed;
  • Examine collinearity of predictors and remove redundancies;
  • Look for outliers and influential observations;
  • Distinguish between confirmatory and exploratory analyses;
  • Prevent an increase in Type I error when carrying out multiple tests;
  • Carry out a sensitivity analysis to assess the robustness of results;
  • Avoid overgeneralizing the implications of a regression model; and
  • Appropriately summarize the methods and results of a multiple linear regression analysis.

Load tidyverse before proceeding. In addition, we will use a few custom functions found in the file Functions_rmph.R (downloadable from RMPH Resources). To access these functions, source() the file containing their code.

library(tidyverse)
# Put Functions_rmph.R in same folder as your R project
source("Functions_rmph.R")