GLMs and the Trouble with Transformations

Let’s get a brief overview of generalized linear models and the problems with transformations.

R packages

We’ll use the following R packages in this chapter:

  • cowplot
  • ggfortify
  • ggplot2
  • MASS
  • SemiPar

Generalized linear models (GLMs)

In the chapter on Regression, we used the normal least squares method to perform a linear regression analysis, which we implemented with the lm() function. However, the simple linear regression analysis wasn’t able to accommodate curvature in the relationship, and the normal least squares assumption of constant variance was violated.

Get hands-on with 1200+ tech skills courses.