1. เรียนรู้
  2. /
  3. Courses
  4. /
  5. Hierarchical and Mixed Effects Models in R

Connected

Exercises

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.

คำแนะนำ 1 / 2

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