Earn the GAM Certificate
Practice the exercises below. When you feel ready, attempt the quiz to earn a verifiable certificate you can share on LinkedIn.
GAM Exercises in R: 15 Practice Problems
Fifteen practice problems on Generalized Additive Models in R: mgcv, smooth terms, splines, interaction smooths, predict. Hidden solutions.
Exercise 1: Simple GAM
Difficulty: Intermediate.
Show solution
Exercise 2: Two smooth terms
Difficulty: Intermediate.
Show solution
Exercise 3: Linear + smooth
Difficulty: Intermediate.
Show solution
Exercise 4: Set basis dimension
Difficulty: Advanced.
Show solution
Exercise 5: Tensor product (interaction smooth)
Difficulty: Advanced.
Show solution
Exercise 6: GAM with categorical
Difficulty: Advanced.
Show solution
Exercise 7: Different smooth basis (cr)
Difficulty: Advanced.
Show solution
Exercise 8: Smooth by group
Difficulty: Advanced.
Show solution
Exercise 9: Plot a smooth
Difficulty: Intermediate.
Show solution
Exercise 10: Summary
Difficulty: Intermediate.
Show solution
Exercise 11: Predict new
Difficulty: Intermediate.
Show solution
Exercise 12: Edf (effective df)
Difficulty: Advanced.
Show solution
Exercise 13: Concurvity (GAM collinearity)
Difficulty: Advanced.
Show solution
Exercise 14: GAM for binary outcome
Difficulty: Advanced.
Show solution
Exercise 15: Check residuals
Difficulty: Intermediate.
Show solution
What to do next
- Linear-Regression-Exercises (shipped), linear baseline.
- Mixed-Effects-Models-Exercises (shipped), hierarchical alternative.
Ready to earn the GAM Certificate?
The quiz is concept-based and respects your time: pass it once and your verifiable certificate is yours to share on LinkedIn, your resume, or your portfolio. Take it when you feel comfortable with the material.
Attempt the quiz→