Loading Events
Home Online Courses Hierarchical Generalized Additive Models for Biological Sciences (HGAM01) (HGAM01)
HGAM01

Hierarchical Generalized Additive Models for Biological Sciences (HGAM01)

Learn hierarchical generalized additive models (HGAMs) to analyse nonlinear, hierarchical, and grouped biological data using R.

  • Duration: 4 Days, 5.5 hours per day
  • Next Date: February 8-11, 2027
  • Format: Live Online Format
TIME ZONE

UK (GMT+1) local time - All sessions will be recorded and made available to ensure accessibility for attendees across different time zones.

£400Registration Fee

Register Now

Like what you see? Click and share!

Course Description

Biological data are often hierarchical: observations are grouped within individuals, populations, species, sites, treatments, or studies, while relationships with predictors may be nonlinear. Hierarchical generalized additive models (HGAMs) provide a flexible framework for modelling these structures by combining smooth functions with partial pooling and random effects.

In this practical online course, participants will learn how to specify, fit, check, interpret, and visualize HGAMs in R using mgcv. Building on Pedersen et al. (2019), the course covers shared trends and group-specific deviations, alternative approaches to factor–smooth interactions, and choosing an appropriate hierarchical structure. It also introduces important recent developments, including sum-to-zero (“sz”) smooths, hierarchies with more than two levels—for example, global, treatment, and subject-specific smooths. We will also explore models that allow response distributions or dispersion parameters to vary among groups, using gfam() and location–scale–shape models.

Examples will be drawn from across the biological sciences, making the course relevant to researchers working with ecological, environmental, animal, veterinary, agricultural, and other biological data.

Each 75-minute session will combine approximately 35–45 minutes of explanation or live coding, 20–30 minutes of guided practical work, and time for discussion and questions.

Supporting paper; Pedersen, E.J., Miller, D.L., Simpson, G.L., Ross, N., 2019. Hierarchical generalized additive models in ecology: an introduction with mgcv. PeerJ 7, e6876. https://doi.org/10.7717/peerj.6876

What You’ll Learn

  • Recognize hierarchical structure in biological data and determine when an HGAM is appropriate.
  • Specify and fit hierarchical GAMs in R using mgcv.
  • Model shared nonlinear trends alongside group-, species-, treatment-, or subject-specific deviations.
  • Choose between alternative factor–smooth constructions, including sum-to-zero (“sz”) smooths.
  • Build models with multiple levels of hierarchy, such as global, treatment-level, and individual-level smooths.
  • Model differences in response distributions or dispersion among groups using gfam() and location–scale–shape models.
  • Evaluate, interpret, compare, and visualize fitted HGAMs and their component smooths.

Course Format

Interactive Learning Format

Each day features a well-balanced combination of lectures and hands-on practical exercises, with dedicated time for discussing participants’ own data, time permitting.

Global Accessibility

All live sessions are recorded and made available on the same day, ensuring accessibility for participants across different time zones.

Collaborative Discussions

Open discussion sessions provide an opportunity for participants to explore specific research questions and engage with instructors and peers.

Comprehensive Course Materials

All code, datasets, and presentation slides used during the course will be shared with participants by the instructor.

Personalized Data Engagement

Participants are encouraged to bring their own data for discussion and practical application during the course.

Post-Course Support

Participants will receive continued support via email for 30 days following the course, along with on-demand access to session recordings for the same period.

Who Should Attend / Intended Audiences

This course is designed for graduate students, postdoctoral researchers, and researchers working in academia or industry who want to apply hierarchical generalized additive models to complex biological data. Participants should have some prior experience using R and a basic understanding of statistical concepts such as regression, model assumptions, and uncertainty. Some familiarity with generalized additive models (GAMs) is strongly recommended, as the course will build on core GAM concepts rather than introduce them from first principles.

Equipment and Software requirements

A laptop or desktop computer with a functioning installation of R and RStudio is required. Both R and RStudio are free, open-source programs compatible with Windows, macOS, and Linux systems.

A working webcam is recommended to support interactive elements of the course. We encourage participants to keep their cameras on during live Zoom sessions to foster a more engaging and collaborative environment.

While not essential, using a large monitor—or ideally a dual-monitor setup—can significantly enhance your learning experience by allowing you to view course materials and work in R simultaneously.

All necessary R packages will be introduced and installed during the workshop. A comprehensive list of required packages will also be shared with participants ahead of the course to allow for optional pre-installation.

Download R Download RStudio Download Zoom

Dr. Gavin Simpson

Dr. Gavin Simpson

Gavin Simpson is an applied statistician, ecologist, and educator with extensive experience in Bayesian statistics, ecological modelling, and reproducible data analysis using R. His work focuses on helping researchers and analysts apply modern statistical methods to complex real-world data, combining deep methodological expertise with a practical, applied approach to teaching and consultancy.

His core expertise includes Generalised Additive Models (GAMs), Bayesian statistical modelling, multivariate analysis, and ecological statistics. Gavin is widely recognised for his work with the R packages mgcv, gratia, vegan, and related statistical workflows, and has contributed extensively to statistical training for academic, environmental, and research organisations internationally.

Gavin has worked across a range of disciplines including ecology, environmental science, palaeoecology, and applied data science, supporting researchers in developing robust and interpretable statistical models. He is particularly known for making advanced statistical techniques accessible to applied researchers through clear explanation, reproducible workflows, and hands-on training.

Education & Career

· PhD in Quantitative Palaeoecology (UCL, Geography)
· Senior statistician and quantitative ecologist
·
Extensive experience teaching statistical modelling and R programming internationally
·
Specialist in Generalised Additive Models (GAMs) and multivariate methods
·
Contributor to open-source statistical software and reproducible research practices

Research & Professional Focus

Gavin’s research integrates statistical modelling to investigate complex datasets—including microbiome, metabolomics, and ecological data—and to develop innovative analytical approaches for animal production systems. I am particularly interested in temporal dynamics, with an emphasis on quantifying and forecasting system-level changes over time.

Current projects

· Development of R packages for working with GAMs, fitting and visualising multivariate ordinations, and creating restricted permutations
· Applications of GAMs and distributional models in animal and veterinary sciences
· Estimating temporal changes in variance of ecological time series
·
Dimension reduction and analysis of high dimensional palaeoecolgoical time series

Professional Consultancy

Gavin works with universities, research institutes, environmental organisations, and businesses to develop statistical methodologies, improve analytical workflows, and support applied quantitative research. His consultancy includes ecological modelling, Bayesian analysis, and advanced regression techniques for complex datasets.

Teaching & Skills

· Specialist in Generalised Additive Models (GAMs), mixed models, data science and applied statistics
·
Experienced trainer in R, and reproducible statistical workflows
·
Strong focus on model interpretation, diagnostics, and practical application
·
Advocate for open-source statistical software and transparent, reproducible research practices

Session 1 – 01:15:00 – Why hierarchical GAMs?

Hierarchical structure in biological data; review of smooths, penalties, smoothing parameters, shrinkage and partial pooling.

 

Session 2 – 01:15:00 – The essential mgcv workflow.

Specifying, fitting, visualizing and interpreting a standard GAM; basis dimensions and REML estimation.

15:00–15:30        Break – 00:30:00

Session 3 – 01:15:00 – Introducing HGAMs.

Global smooths, group-specific smooths, shared and separate smoothing parameters, and the principal model structures from the original HGAM paper.

Session 4 – 01:15:00 – Practical 1.

Fit and compare a sequence of GAMs and HGAMs for grouped biological data. Interpret the global and group-specific components.

Session 5 – 01:15:00 – Factor–smooth interactions.

Factor by smooths, linked smoothing parameters and the “fs” basis; what each construction assumes.

Session 6 – 01:15:00 – Sum-to-zero smooths.

Using the “sz” basis to represent a global smooth plus identifiable group-specific deviations.

Break – 00:30:00

Session 7 – 01:15:00 – Choosing an HGAM structure.

Common versus group-specific trends, different degrees of pooling, model complexity and biological interpretation.

Session 8 – 01:15:00 –  Practical 2.

Fit, and visualize alternative HGAM structures for species-, treatment- or subject-specific trajectories.

Session 9 – 01:15:00 –  More than two hierarchical levels.

Constructing models with global, treatment-level and subject-level smooths.

Session 10 – 01:15:00 –  Smooths, penalties and random effects.

The equivalence between penalized smooths and Gaussian random effects; smoothing parameters as variance components; a brief introduction to simple random-effect smooths in mgcv.

Break – 00:30:00

Session 11 – 01:15:00 –  Different distributions among groups.

Using gfam() when observations or groups require different response distributions or dispersion parameters.

Session 12 – 01:15:00 –  Distributional models.

Introducing location–scale–shape models in which smooth effects may be specified for more than the conditional mean, followed by a guided practical.

Session 13 – 01:15:00 –  Checking HGAMs.

Residual diagnostics, basis-dimension checking, concurvity, distributional assumptions, heterogeneity and residual dependence.

Session 14 – 01:15:00 –  Inference and communication.

Predictions, uncertainty intervals, comparisons between smooths, response-scale summaries and effective visualization of complex models.

Break – 00:30:00

Session 15 – 01:15:00 –  Integrated case study.

Translate a biological question and sampling design into candidate models; fit, compare, diagnose and refine the models.

Session 16 – 01:15:00 –  Model-building workshop and review.

Participants develop and interpret an HGAM, discuss their choices, troubleshoot common problems and consolidate a reusable modelling workflow.

Testimonials

PR Stats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PR Stats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Testimonials

PR Stats provided excellent training in stable isotope analysis through the SIMMPR course, which was incredibly valuable for my research. I was fortunate to attend the course through a generous fee waiver, which directly supported my work and enabled me to develop skills that contributed to my recent publication on reservoir food webs in Sri Lanka. I’m very grateful for the opportunity and support, and would highly recommend their courses to others working in ecological research.

Subodha Silva

Aquatic Ecology Researcher

Courses attended

SIMMPR

Testimonials

PR Stats has become an invaluable part of developing my skills in advanced statistical and spatial analysis. Through training in areas such as Bayesian statistics and Species Distribution Modelling, I’ve gained both practical expertise and exposure to leading experts in the field. The impact on my research has been significant with at least four of my published papers have been directly influenced by PR Stats courses. My most recent work benefitted from modelling advice on sample design and model accuracy evaluation and can be seen here.

Carlos P.E. Bedson

Quantitative Spatial Ecology, Ecology and Environment Research Centre, Manchester Metropolitan University, United Kingdom

Courses attended

ADVR08, ENMR03, BMIN02, ISBD01, BADA01, SDMB06

Frequently asked questions

Everything you need to know about the product and billing.

When will I receive instructions on how to join?

You’ll receive an email on the Friday before the course begins, with full instructions on how to join via Zoom. Please ensure you have Zoom installed in advance.

Do I need administrator rights on my computer?

Yes — administrator access is recommended, as you may need to install software during the course. If you don’t have admin rights, please contact us before the course begins and we’ll provide a list of software to install manually.

I’m attending the course live — will I also get access to the session recordings?

Yes. All participants will receive access to the recordings for 30 days after the course ends.

I can’t attend every live session — can I join some sessions live and catch up on others later?

Absolutely. You’re welcome to join the live sessions you can and use the recordings for those you miss. We do encourage attending live if possible, as it gives you the chance to ask questions and interact with the instructor. You’re also welcome to send questions by email after the sessions.

I’m in a different time zone and plan to follow the course via recordings. When will these be available?

We aim to upload recordings on the same day, but occasionally they may be available the following day.

I can’t attend live — how can I ask questions?

You can email the instructor with any questions. For more complex topics, we’re happy to arrange a short Zoom call at a time that works for both of you.

Will I receive a certificate?

Yes. All participants receive a digital certificate of attendance, which includes the course title, number of hours, course dates, and the instructor’s name.

When will I receive instructions on how to join?

You’ll receive an email on the Friday before the course begins, with full instructions on how to join via Zoom. Please ensure you have Zoom installed in advance.

Do I need administrator rights on my computer?

Yes — administrator access is recommended, as you may need to install software during the course. If you don’t have admin rights, please contact us before the course begins and we’ll provide a list of software to install manually.

I’m attending the course live — will I also get access to the session recordings?

Yes. All participants will receive access to the recordings for 30 days after the course ends.

I can’t attend every live session — can I join some sessions live and catch up on others later?

Absolutely. You’re welcome to join the live sessions you can and use the recordings for those you miss. We do encourage attending live if possible, as it gives you the chance to ask questions and interact with the instructor. You’re also welcome to send questions by email after the sessions.

I’m in a different time zone and plan to follow the course via recordings. When will these be available?

We aim to upload recordings on the same day, but occasionally they may be available the following day.

I can’t attend live — how can I ask questions?

You can email the instructor with any questions. For more complex topics, we’re happy to arrange a short Zoom call at a time that works for both of you.

Will I receive a certificate?

Yes. All participants receive a digital certificate of attendance, which includes the course title, number of hours, course dates, and the instructor’s name.

Still have questions?

Can’t find the answer you’re looking for? Please chat to our friendly team.

×

Tickets

The numbers below include tickets for this event already in your cart. Clicking "Get Tickets" will allow you to edit any existing attendee information as well as change ticket quantities.
HGAM01 ONLINE
HGAM01 ONLINE
£ 400.00
Unlimited
£400.00
8th February 2027 - 12th February 2027
Delivered remotely (United Kingdom), Western European Time, United Kingdom
A close up of an Elephant