Session Ready
Exercise

Plotting GLMs

Often, we want to "look" at our data and trends in our data. ggplot2 allows us to add trend lines to our plots. The default lines are created using a technique called local regression. However, we can specify that different models are used to create the lines, including GLMs.

During this exercise, we'll see how to plot a GLM with ggplot2.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Add a stat_smooth() to the first plot to fit the default line type.