Course Structure
What is MFIIDD?
Model fitting and inference for infectious disease dynamics (MFIIDD) is a hands-on course that teaches you to fit mathematical models of infectious disease to data using modern Bayesian methods.
This course assumes you already know how to build epidemic models (SIR, SEIR, etc.) and focuses on the next step: fitting those models to data and drawing rigorous conclusions from the results. If you need to learn epidemic modelling from scratch, we recommend completing an introductory modelling course first — for example, the CMMID Modern Techniques in Modelling short course (R-based).
You’ll work with real and simulated outbreak data, building from simple deterministic models to stochastic compartmental models (where individual infection events happen randomly, unlike the smooth ODE solutions you may have seen before). By the end, you’ll be able to specify a transmission model, write down a likelihood, and use MCMC (and other methods) to estimate parameters and quantify uncertainty.
Prerequisites
To get the most from this course, you should be comfortable with:
- Basic programming: Variables, functions, loops, conditionals (in any language)
- Probability: Some familiarity with what probability means
- Epidemic modelling: Compartmental models (S, I, R states), transmission dynamics, and solving ODEs — e.g. from the MTM course or equivalent experience
The course uses Julia for inference, as it provides an interface to all of the state-of-the-art methods used in this course. No prior Julia experience is required; the course introduces Julia syntax as you go.
Course map
The course has 11 sessions organised into three tiers. Work through them in order, or use this map to plan your time.
Core sessions (10-12 hours) - complete in order:
Getting Started → Introduction → MCMC → Diagnostics → Model Checking
Stochastic sessions (5-6 hours) - for fitting models with demographic stochasticity:
SEITL Interlude (Susceptible–Exposed–Infectious–Temporary immunity–Long-term immunity) → Particle Filters → Particle MCMC
Advanced sessions (2-3 hours each) - independent, pick based on interest:
- Observation Models — requires MCMC (can skip stochastic track)
- Variational Inference — requires MCMC only (can skip stochastic track)
- Universal Differential Equations — requires Introduction only (independent track)
If you only have limited time:
| Time available | Recommended path |
|---|---|
| Half day (4 hrs) | Getting Started → Introduction → MCMC (read-only, skip exercises) |
| Full day (8 hrs) | Core sessions (Getting Started through Model Checking) |
| Two days (16 hrs) | Core + Stochastic models |
| Full course | All sessions, including advanced topics of interest |
Session structure
Each session follows a consistent structure:
- Introduction: What we’ll learn and why it matters
- Setup (collapsible): Package loading and initialisation
- Main content: Concepts, code, and exercises
- Summary: What we covered (with Learning Points callout)
- Going further: Optional extensions for interested participants
For R and Stan users
The early sessions include inline “Coming from R?” callouts comparing Julia syntax to R equivalents (e.g. deSolve, distributions, plotting). Where the comparison is with a probabilistic programming language rather than R itself, callouts are labelled “Coming from Stan?” instead. The MCMC session also has an appendix with a full R translation of the Metropolis-Hastings algorithm.
If you prefer R, the conceptual material is still valuable, but be aware that some methods taught here aren’t readily available in R:
| Method | R / Stan availability |
|---|---|
| Basic MCMC (Metropolis-Hastings) | nimble, mcstate, pomp |
| NUTS with automatic differentiation | Stan |
| Particle filters / PMCMC | pomp, odin/dust/mcstate |
| Variational inference | Stan |
| Universal differential equations | Not available in R or Stan |
For particle-based methods, odin with dust and mcstate is the closest R equivalent. For gradient-based MCMC (NUTS) or variational inference, Stan is the standard tool (accessible from R, Python, and other languages).