Generalized Additive Modeling of Ecological Data With mgcv: New Adequacy Assessment Tools

Read full text
Authors: Julien Mainguy, Rachel McInerney, Russell Millar, Éliane Valiquette, Martin Bélanger, Rafael de Andrade Moral
Cited by: 4
References: 26

Abstract

Generalized additive models (GAMs) are a semi-parametric extension of generalized linear models (GLMs) that allow incorporating different forms of nonlinearities commonly encountered in ecological relationships, thus frequently offering a better statistical description than GLMs in such cases. Due to the use of smooth functions, however, validating that the observed data represent a plausible realization of a fitted GAM according to the underlying distributional assumptions being used is less straightforward than with GLMs. Moreover, if the number of basis dimensions used in smooth terms to control the degree of flexibility is set too large, overfitting can arise despite in-built penalization procedures aimed at preventing excessive wiggliness. Here, we present how GAMs fitted with the mgcv package in R can be assessed for their adequacy based on half-normal plots with a simulated envelope using newly-available helper functions for the hnp package. A proposed metric relying on the mgcViz package is also presented to help detect both under- and overfitting relative to a predictor of interest from a realized coverage perspective. Three fisheries-related examples analyzing continuous data, counts, and discrete proportions are then presented to illustrate the usefulness of these approaches in providing more statistical context for the interpretation of nonlinear ecological relationships.

Fields of Study & Subjects

Marine and fisheries research Statistical Methods and Bayesian Inference Sustainability and Ecological Systems Analysis

Publication details

Journal / source
Ecology and Evolution
Publisher
Wiley
Volume
16
Issue
1
Pages
e72825–e72825
Publication date
1 January 2026
Language
EN