Modelling Infectious Diseases

SPARKLE workshop, Malaysia, 2026

Presenter: SPARKLE

Welcome

This course introduces mathematical models of infectious disease transmission and their implementation in R. Work through the sessions in order unless your facilitator advises otherwise. The established numbering is retained, so the sequence moves from Session 5 to Session 7.

Using these materials

  • Work in an RStudio Project and keep the files for each session together.
  • Install the packages requested by a session once, then load them from your script.
  • Download the starter files below before the relevant session.
  • Save your work regularly.

During coding sessions, a Need to catch up? box appears after each major stage. Its link downloads a runnable script containing all completed code up to that point, but none of the code from later exercises.

Starter files and data

Sessions

  1. Introduction to mathematical modelling
  2. Differential equations in R
  3. Designing a model to suit the pathogen
  4. Modelling an outbreak—COVID-19 in Malaysia
  5. Fitting models in R
  6. Vector-borne disease modelling
  7. Vector-borne disease models in R
  8. Modelling interventions in R