This repository includes material for the Physalia workshop on Generalized linear Latent Variable Models, 10-13 June 2024. Feel free to share, alter, or re-use this material with appropriate referencing of this repository.
Workshop webpage: https://www.physalia-courses.org/courses-workshops/gllvm/
Since the 1950s, ecologists have used ordination methods for analysis of data on ecological communities. In recent years, research by (amongst others) Warton et al. 2012 has shown that classical ordination methods (PCA, PCoA, RDA, CA, CCA, NMDS etc.) which rely on distance measures have various unfavourable properties that lead to a poor representation of the composition of communities.
Hui et al. (2015) suggested to use the Generalized Linear Latent Variable Modeling (GLLVM) framework instead, and with it modernize ecological multivariate analysis. It is not quite clear to me (at present) who proposed GLLVMs as a class of models first, but Skrondal and Rabe-Hesketh (2004) and Bartholomew et al. 2011 are go-to resources. It is clear however, that the first latent variable model method to be developed was Factor analysis (Spearman, 1904), which is a GLLVM for normally distributed responses. Factor analysis is not a very popular method in community ecology, mostly because it was noted early on that its assumption of normally distributed responses does not hold for most ecological applications.
GLLVMs have many properties in common with Generalised Linear Models (GLMs, Nelder and Wedderburn 1972), Generalised Linear Mixed Models, and with other ordination methods. Estimation tends to be challenging due to the omnipresence of random effects, but there are many favorable statistical properties, and tools for inference, that are worth the hassle. This workshop teaches GLLVMs by first providing a quick recap of GLMs, GLMMs, and classical ordination methods since those methods are more familiar to most ecologists (i.e., basic statistical concepts as sampling theory and such are assumed to be somewhat familiar to participants). The material of my Physalia workshop on Generalised Linear Models can be found here. Gavin Simpsons' Physalia workshop on classical multivariate analysis (github here) can serve as an introduction to some of the material in this course.
I will assume all workshop participants to be sufficiently familiar with the R statistical programming language, so that in this course I do not recap use of R and Rstudio.
Please make sure to update your R installation prior to the workshop. Most of the code used in the workshop should function on older versions of R as well, but not all R packages used might be available or function fully.
You can find an R installation based on your operating system here
Sessions from 14:00 to 20:00 (Monday to Thursday). Sessions will consist of a mix of lectures, in-class discussion, and practical exercises / case studies over Slack and Zoom.
- Introduction and overview
- Recap of Generalised Linear Models
- Recap of Generalised Linear Mixed Models
- Recap Concepts in multivariate analysis
- Introduction to the gllvm R-package
- Comparing model-based and classical ordination
- Unimodal response models in gllvm
- Ordination with covariates
- Joint Species Distribution Models,Fourth-corner latent variable models, Phylogenetic random effects
- Tools, tips and tricks
- Other R packages for fitting GLLVMs and JSDMs
- Beyond vanilla GLLVMs: hierarchical ordination and machine learning
- Possibility for own data analysis, or addressing suggested topics by participants
Day | Time | Subject |
---|---|---|
Monday | 14:00 - 14:45 | Introduction |
14:45 - 15:45 | Recap of Generalised Linear Models (GLM) | |
15:45 - 16:00 | Break | |
16:00 - 16:45 | Practical 1: Fitting vector GLMs | |
16:45 - 17:45 | Recap of Generalised Linear Mixed Models (GLMM) | |
17:45 - 18:30 | Break | |
18:30 - 19:15 | Practical 2: Fitting multispecies GLMMs | |
19:15 - 20:00 | Recap of classical ordination | |
--------- | ------------- | ---------------------------------------------------------------- |
Tuesday | 14:00 - 14:45 | Introduction to GLLVMs and the gllvm R-package |
14:45 - 15:45 | Practical 3: Getting familiar with the gllvm R-package | |
15:45 - 16:00 | Break | |
16:00 - 16:45 | GLLVMs vs. classical ordination methods | |
16:45 - 17:45 | Practical 4: Comparing model-based and classical ordinations | |
17:45 - 18:30 | Break | |
18:30 - 19:15 | The unimodal response model | |
19:15 - 20:00 | Practical 5: Unimodal response models in gllvm | |
--------- | ------------- | ---------------------------------------------------------------- |
Wednesday | 14:00 - 14:45 | Ordination with covariates |
14:45 - 15:45 | Practical 6: Ordination with covariates | |
15:45 - 16:00 | Break | |
16:00 - 16:45 | Joint Species Distribution Modeling | |
16:45 - 17:45 | Practical 7: Fourth-corner latent variable models | |
17:45 - 18:30 | Break | |
18:30 - 19:15 | Tools and tips for inference, diagnostics, and convergence | |
19:15 - 20:00 | Practical 8: Tools and tips for finding a good GLLVM | |
--------- | ------------- | ---------------------------------------------------------------- |
Thursday | 14:00 - 14:45 | Other R packages for fitting GLLVM and JSDMs |
14:45 - 15:45 | Practical 9: Fit a model with various R packages | |
15:45 - 16:00 | Break | |
16:00 - 16:45 | Beyond GLLVMs | |
16:45 - 17:45 | Practical 10: Machine learning methods | |
17:45 - 18:30 | Break | |
18:30 - 20:00 | Wrapping up - questions, requests, own analysis | |
--------- | ------------- | ---------------------------------------------------------------- |