Tutorial: Generalized Additive Models

presented by Simon Wood

This session will cover the use of Generalized Additive Models, based on penalized regression smoothers, as implemented in R package mgcv. A GAM is simply a GLM in which part of the linear predictor is specified in terms of a sum of unknown smooth functions of some predictor variables, and this rather flexible way of specifying models has found application in fields as diverse as ecology and finance. The representation of smooths using penalized basis expansions will be covered, before discussing model estimation and the important topic of how to estimate the appropriate degree of smoothness for model components. After this overview of the basic methods, the use of `gam' and related functions in the mgcv package will be covered. A basic introduction will be followed by discussion of some of the modelling choices that have to be made in practical use of GAMs.

GAM methods:

Using mgcv::gam:

More advanced use:

The course is based on the book "Generalized Additive Models: An Introduction with R" (Wood, Chapman Hall/CRC, 2006); useRs can obtain this book at a 20% discount from here, using the promotion code 585HHXXXX.

Back to Tutorials