1. Learn
  2. /
  3. Courses
  4. /
  5. Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Exercise

Setting complexity of the motorcycle model

The number of basis functions in a smooth has a great impact on the shapes a model can take. Here, you'll practice modifying the number of basis functions in a model and examining the results.

Instructions

100 XP
  • Fit a GAM with 3 basis functions to the mcycle data, with accel as a smooth function of times.
  • Fit the same GAM again, but this time with 20 basis functions.
  • Use the provided plot() functions to visualize both models.