 In this paper, we explore an extension to two popular approaches for modeling complex structures and ecological data, generalized additive models, GAMs, and hierarchical generalized linear mixed effects models, HGLMs. This extension, called hierarchical generalized additive models, GAMs, allows for modeling of nonlinear functional relationships between covariates and outcomes where the shape of the relationship differs between different grouping levels. We connect the theoretical connections between GAMs, HGLMs, and GAMs, explain how the model different assumptions about the degree of intergroup variability in functional response and demonstrate how to fit GAMs using existing GAM software, the MGCV package NR. Additionally, we discuss computational and statistical issues with fitting these models and provide examples of how to apply them to real-world datasets. This article was authored by Eric J. Pedersen, David L. Miller, Gavin L. Simpson, and others. We're article.tv, links in the description below.