[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-460900-105":59,"doc-detail-460900-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","generalized-additive-modeling-of-ecological-data-with-mgcv-new-adequacy-assessment-tools","Generalized Additive Modeling of Ecological Data With mgcv - New Adequacy Assessment Tools","","Generalized additive models (GAMs) extend generalized linear models by using smooth functions to capture nonlinear ecological relationships more faithfully than GLMs. Validation of whether observed data plausibly realize fitted GAMs is more difficult because distributional assumptions must be assessed beyond linear predictors. Overfitting may still occur if smoothness is overly flexible despite penalization. The work presents GAM adequacy assessment for mgcv in R via half-normal plots with simulated envelopes using hnp helpers, plus mgcViz-based metrics to diagnose under- and overfitting across fisheries case studies.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/generalized-additive-modeling-of-ecological-data-with-mgcv-new-adequacy-assessment-tools/460900/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/generalized-additive-modeling-of-ecological-data-with-mgcv-new-adequacy-assessment-tools/460900.png","ImageObject",300,407,{"name":92,"@type":93},"Aria Callaghan","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-27","2026-09-30",true,{"@type":102,"interactionType":103,"userInteractionCount":34},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Why are GAMs often preferred over GLMs in ecological analysis?","Question",{"text":112,"@type":113},"GAMs use smooth functions that flexibly model nonlinear relationships commonly found in ecology, often giving a better statistical description than GLMs.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What makes adequacy validation for GAMs harder than for GLMs?",{"text":117,"@type":113},"Because GAMs rely on smooth terms, assessing whether the fitted model is a plausible realization of the data under the assumed distribution is less straightforward than for GLMs.",{"name":119,"@type":110,"acceptedAnswer":120},"How do the proposed tools assess GAM adequacy in practice?",{"text":121,"@type":113},"They use half-normal plots with a simulated envelope for mgcv-fitted GAMs, supported by new helper functions for the hnp package, and an additional metric based on mgcViz to detect under- and overfitting.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},460900,1790981209,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":34,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},962084926284,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Ecology and Evolution   \n RESEARCH ARTICLE  OPEN ACCESS   \nGeneralized Additive Modeling of Ecological Data With mgcv:New Adequacy Assessment Tools  \nJulien Mainguy1  | Rachel McInerney2  | Russell B. Millar3  | Eliane Valiquette1 | Martin Bélanger4  | Rafael de Andrade Moral2   \n1Direction principale de l'expertise sur la faune aquatique, Ministère de l'Environnement, de la Lutte contre les changements climatiques, de la Faune et des Parcs, Québec, Québec, Canada | 2Department of Mathematics and Statistics, Maynooth University, Maynooth, Ireland | 3Department of Statistics, University of Auckland, Auckland, New Zealand | 4Direction de la gestion de la faune de l'Abitibi-Témiscamingue, Ministère de l'Environnement, de la  \nLutte contre les changements climatiques, de la Faune et des Parcs, Rouyn-Noranda, Québec, Canada Correspondence: Julien Mainguy ([julien.mainguy@environnement.gouv.qc.ca](julien.mainguy@environnement.gouv.qc.ca))  \nReceived: 25 October 2025 | Revised: 9 December 2025 | Accepted: 12 December 2025  \nKeywords: adjusted deviance explained | deviance residuals | half-normal plot with a simulated envelope | mgcViz score | under-and overfitting  \nABSTRACT  \nGeneralized 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.  \n1 | Introduction  \nThe analysis of diverse types of ecological data is frequently performed with generalized linear models (GLMs) due to their renowned analytical flexibility and associated advantage of producing directly interpretable coefficients at the linear predictor scale (Bolkeret al. 2009; Zuuret al. 2009) . However, GLMsarefrequently limited in their ability to statistically describe nonlinear relationships that can differ from the specific shapes imposed by the inclusion of polynomial terms (e.g., quadratic) but are nonetheless commonly encountered in ecology (Heit et al. 2024) . In such cases, a semi-parametric GLM extension, the generalized  \nadditive model (GAM), often provides a better alternative to statistically describe these more complex curvilinear relationships (e.g., Aubry et al. 2009) . This is mainly attributable to the ability of a GAM to automatically incorporate different forms of nonlinearities through the application of smooth functions (Hastie and Tibshirani 1986; Wood 2017) . As a result, GAMshave become increasingly employed alongside GLMs in ecology (van der Burg et al. 2010; Nelsen et al. 2023; Rodriguez-Cordero et al. 2024; Mainguy, Paradis, and Moral 2025), but contrary to GLMs, their parameter coefficients are not directly interpretable such that visualization of the fitted values is required for their interpretation. Both GLM and GAM fits, howe","cbCaisFJ1bYjQqKQ","https://ap.wps.com/l/cbCaisFJ1bYjQqKQ","pdf",1852000,11,"English","# Introduction\n## Residual-based adequacy and diagnostic plots\n## Quantile-Quantile and worm plots\n## Objective complementary adequacy assessments","[{\"question\":\"Why are GAMs often preferred over GLMs in ecological analysis?\",\"answer\":\"GAMs use smooth functions that flexibly model nonlinear relationships commonly found in ecology, often giving a better statistical description than GLMs.\"},{\"question\":\"What makes adequacy validation for GAMs harder than for GLMs?\",\"answer\":\"Because GAMs rely on smooth terms, assessing whether the fitted model is a plausible realization of the data under the assumed distribution is less straightforward than for GLMs.\"},{\"question\":\"How do the proposed tools assess GAM adequacy in practice?\",\"answer\":\"They use half-normal plots with a simulated envelope for mgcv-fitted GAMs, supported by new helper functions for the hnp package, and an additional metric based on mgcViz to detect under- and overfitting.\"}]","Generalized Additive Modeling of Ecological Data With mgcv - New Adequacy Assessment Tools | PDF",1790760022,28,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ee6fa1eabf118f6e1b2f72c94e77569a.webp",983,1291,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/562c24ab851ba2873c2c97a8a18302a0.webp",982,1290,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e799d65e3d06a85d009db3d943344637.webp",981,1289,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/256ba1a4fd8d95b67b7fcf05a12180bb.webp",980,1287]