1 - Introduction to Generalized Additive Models

In this chapter, you will learn how Generalized additive models work and how to use flexible, nonlinear functions to model data without over-fitting. You will learn to use the gam() function in the mgcv package, and how to build multivariate models that mix nonlinear, linear, and categorical effects to data.


2Motorcycle crash data: linear approach

3Motorcycle crash data: non-linear approach

4Parts of non-linear function

5Basis functions and smoothing

6Setting complexity of the motorcycle model

7Using smoothing parameters to avoid overfitting

8Complexity and smoothing together

9Multivariate GAMs

10Multivariate GAMs of auto performance

11Adding categorical to the auto performance model

12Category-level smooths for different auto types