Kickstarting the year with HGAMs

To start off Reading Group for 2019, we dove headfirst into 43 brilliant pages on hierarchical generalised additive models (HGAMs) by Pederson et al. 2018, a pre-print titled Hierarchical generalised additive models: an introduction with mgcv. Although at first intimidated by the subject matter and length of the reading, we found that the paper presented rather complicated statistical models in a series of extremely approachable explanations and R code. Talk about speaking our language! So, what are HGAMs, when might we use them instead of other models such as nonlinear models, and what else did we take away from this reading?

IMG_4423 2

“And this is what a GAM is!” Saras’ happy scribbling during reading group.

HGAMs allow us to model nonlinear functional relationships between our response and predictor variables, where the shape of the function can vary between grouping levels, commonly known as ‘random effects’. Two examples of HGAMs being used by people in our group were: a model of soil carbon that varies non-linearly with depth across a range of sites, and interpolating the NDVI across a time series between two separate satellites. A HGAM is very useful for questions like these, that are otherwise well-suited to a generalised linear modelling framework but happen to include a term that needs to vary non-linearly. A GAM also adds constraints to the end points of a spline, generally reducing the chance of having wildly inappropriate predictions for the fringe of your data. However, nonlinear models such an exponential model may be more appropriate when the shape of the model itself is physiologically informed, such as for growth or decay curves.

We loved the way this paper encouraged us to think about how to choose the structure of our hierarchical effects, be it in a GAM or a GLM. The figures were extremely well done, illustrating for example how a GAM is constructed with a series of underlying basis functions and how grouping levels can be modelled with different formulations of a hierarchical GAM. The authors did an exceptional job outlining the various types of hierarchical models one might fit, and stressed that although selecting between them can be approached computationally such as by comparing AIC values, many of the decisions will be dependent on the aim of the model.

— Saras W (


This entry was posted in generalised additive models, pre-print, Reading Group, Statistics and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s