About the course | Intended audience | Prerequisites | Content details
About the course
An applied introduction to linear mixed effects models, also known as multi-level or hierarchical models, for researchers who want to use these methods in their own research or studies.
This course focuses on the practical skills and key concepts needed to work with mixed effects models using R and the lme4 package. The emphasis is on applied examples, real datasets, interpretation, and model checking rather than mathematical derivation.
Topics include random intercepts and slopes, the syntax of the lme4 package, model visualisation, significance testing, model comparison, checking assumptions, nested random effects, crossed random effects, and complex experimental designs.
By the end of the course, participants should have:
- a conceptual understanding of what mixed effects models are
- an understanding of when mixed effects models should be used
- familiarity with fitting mixed effects models using the lme4 package in R
- confidence interpreting and visualising mixed effects model outputs
- an understanding of how to check assumptions and assess model quality
Please note that this course builds on knowledge of linear modelling and should not be considered a general introduction to statistical modelling.
Intended audience
This course is suitable for:
- postgraduate students, postdoctoral researchers, and other researchers working with experimental or observational data
- participants whose data contain repeated measures, grouped observations, hierarchical structure, or other forms of non-independence
- researchers who already understand linear models and want to extend their statistical toolkit
- participants with a working knowledge of R and RStudio
Prerequisites
Although this course is aimed at a non-specialist audience, it assumes that all attendees already have knowledge of core statistical concepts, especially linear modelling.
A working knowledge of R and RStudio is required. Please do not sign up for this course unless you have these prerequisite skills and knowledge.
We strongly recommend first attending the Core Statistics and/or Data Analysis in R course if you do not already have equivalent statistical and basic R training.
Related courses: Data analysis in R or Python, Core statistics
Content details
The course covers the following topics:
- Overview and setup
Introduces the aims of the course, the datasets used in the materials, and the R setup needed to fit and interpret mixed effects models using lme4.
- Independence and pseudoreplication
Explains the motivation for mixed effects models by focusing on independence of observations. Participants learn how biological and technical replicates differ, how pseudoreplication can arise, and why ignoring non-independence can lead to misleading results.
- Introducing random effects
Introduces random effects and explains how they account for clustering or grouping in datasets. The session covers the distinction between fixed and random effects, exchangeability, grouping variables, and how mixed models share information across levels of a random effect.
- Fitting mixed effects models
Covers the practical syntax for fitting linear mixed effects models in R using the lme4 package. Participants learn how to specify random intercepts and random slopes, fit models to hierarchical datasets, and interpret core model outputs.
- Visualising mixed effects models
Focuses on plotting observed data and fitted model predictions. Participants learn how visualisation can support interpretation of fixed effects, random effects, and model structure.
- Significance testing and model comparison
Introduces approaches for assessing evidence in mixed effects models, including comparison of competing models. The emphasis is on practical interpretation and understanding what different testing approaches can and cannot tell you.
- Checking assumptions and model quality
Covers diagnostic checks for mixed effects models, including residual patterns, model fit, and potential violations of assumptions. Participants learn when model outputs should be treated cautiously and how to identify common problems.
- Nested random effects
Explores designs where one grouping variable is contained within another, such as measurements within individuals, individuals within groups, or samples within experimental units. Participants learn how to recognise and specify nested random effects.
- Crossed random effects
Covers designs where grouping variables are not nested but cross one another. Participants learn how crossed random effects arise in experimental and observational data, and how to represent these structures in mixed effects models.
- Complex experimental designs
Applies mixed effects modelling to more complex datasets and study designs. Participants practise choosing appropriate random effect structures and interpreting models that reflect realistic research data.
- Additional concepts
The course also gives a brief introduction to maximum likelihood estimation and mixed effects model notation for participants who want a deeper understanding of the statistical framework.