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

Connected

Exercise

Complexity and smoothing together

The number of basis functions and the smoothing parameters interact to control the wiggliness of a smooth function. Here you will see how changing both together affects model behavior.

Instructions

100 XP
  • Fit a GAM models to the mcycle data with accel as a smooth function of times with 50 basis functions and a smoothing parameter of 0.0001.
  • Visualize the model.