MURAL - Maynooth University Research Archive Library



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


    Mainguy, Julien, McInerney, Rachel, Millar, Russell B., Valiquette, Eliane, Bélanger, Martin and Moral, Rafael de Andrade (2026) Generalized Additive Modeling of Ecological Data With mgcv: New Adequacy Assessment Tools. Ecology and Evolution, 16 (1). ISSN 2045-7758

    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.
    Item Type: Article
    Keywords: adjusted deviance explained; deviance residuals; half-normal plot with a simulated envelope; mgcViz score; under- and overfitting;
    Academic Unit: Faculty of Science and Engineering > Mathematics and Statistics
    Item ID: 21301
    Identification Number: 10.1002/ece3.72825
    Depositing User: IR Editor
    Date Deposited: 12 Mar 2026 10:29
    Journal or Publication Title: Ecology and Evolution
    Publisher: Wiley
    Refereed: Yes
    Related URLs:
    Use Licence: This item is available under a Creative Commons Attribution Non Commercial Share Alike Licence (CC BY-NC-SA). Details of this licence are available here

    Downloads

    Downloads per month over past year

    Origin of downloads

    Altmetric Badge

    Repository Staff Only (login required)

    Item control page
    Item control page