1. Học hỏi
  2. /
  3. Khoa Học
  4. /
  5. Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Connected

Bài tập

Adding categorical to the auto performance model

Now you'll include categorical variables in your model. Categories are inherently linear, so you'll model them as linear terms.

Hướng dẫn

100 XP
  • Fit a GAM to the mpg data, modeling city.mpg as a sum of smooth functions of weight, length, and price, and also include the categorical terms fuel, drive, and style.
  • Use the plot() function provided to visualize the model.