GAMs in Practice: mgcv
DOI link for GAMs in Practice: mgcv
GAMs in Practice: mgcv book
This chapter examines use of the generalized additive modelling functions provided by R package mgcv: the design of these functions is based largely on T. J. Hastie, although to facilitate smoothing parameter estimation, their details have been modified. There are three main modelling functions: gam, bam, and gamm a version of gam for estimating generalized additive mixed models via package nlme, allowing access to a rich range of random effects and correlation structures. In addition jagam provides an interface to JAGS for Bayesian stochastic simulation. Metric by variables combined with a summation convention are the means by which linear functionals of smooths can be incorporated into the linear predictor. The smooth constructor and prediction matrix method functions are usually called via wrapper functions that handle things like identifiability constraints, matrix arguments and by variables automatically for any smooth.