SMC and epidemic renewal models

Author

Nicholas Steyn

Published

October 29, 2024

Warning

This is a very early beta version of this site and will change significantly over the coming months.

Comments, suggestions, and feedback are very welcome and can be sent to: nicholas.steyn@univ.ox.ac.uk. Please also get in touch if you would like to collaborate!

Please see the working paper for a more complete (if brief) overview of the topics that will be covered here.

Welcome

Renewal models are popular in statistical epidemiology for their use as a semi-mechanistic model of disease transmission. We demonstrate how sequential Monte Carlo (SMC) methods can be used to perform inference on and forecast with these models.

With these methods one can:

  • Estimate \(R_t\) from imperfect data, or from multiple sources of data
  • Produce well-calibrated short-term forecasts
  • Estimate abrupt change-points in disease transmission
  • … and so much more

Our approach:

  • Is simple, intuitive, and flexible
  • Produces valid credible intervals on quantities of interest
  • Can simultaneously account for reporting biases, aggregated/missing data, imported cases, multiple data sources, and more.

Reported cases for the first 100 days of the COVID-19 pandemic in Aotearoa New Zealand Ministry of Health NZ (2024). We will develop methods to estimate the reproduction number from these data.

Renewal models underlie many of the most popular methods for reproduction number estimation, including EpiEstim (Cori et al. 2013) and EpiNow2 (Abbott et al. 2020). They have also been used to model elimination probabilities (Parag, Cowling, and Donnelly 2021), estimate the effect of non-pharmaceutical interventions (Flaxman et al. 2020), and produce forecasts (Banholzer et al. 2023), for example.

Structure of this website

This website is made up of a collection of Jupyter-style notebooks. All code is implemented in Julia, a programming language with the speed of C++ and simplicity of R and Python. The notebooks are organised into chapters:

Using Julia

We recognise that Julia is not widely used in epidemiology. While we would love to implement our methods in R, they would be extremely slow without a C++ backend. Instead, our methods are all natively implemented in Julia and require no external software - making the entire process much simpler!

Getting started with Julia is easy (see below) and our examples are written for those with no prior knowledge of the language.

Getting started

We do not use any external dependencies, so you can run all code in this repository with a standard Julia installation. To get started, all you need to do is:

  1. Install Julia from julialang.org
  2. Clone this repository
  3. Start Julia in your terminal and run:
using Pkg
Pkg.add("IJulia")
using IJulia
notebook()

This will open a Jupyter notebook in your browser. Navigate to the GitHub repository and open main.ipynb to get started.

Alternatively, you can open the cloned repository in VS Code (or your preferred IDE) and run the notebooks this way. If using VS Code, we recommend installing the Julia extension.

GitHub layout

The files and folders you should care about:

  • /notebooks/: Contains the main tutorial notebooks
  • /src/: Contains important source code
  • /data/: Contains all example data used in the tutorial

You can ignore (but feel free to explore):

  • /paper/: Scripts and outputs associated with the accompanying paper
  • /docs/: Contains the rendered tutorial
  • /site/: Contains the quarto website files (these are rendered to /docs/)
  • /assets/: Contains images and other assets used in the tutorials and readme files
  • and files like .gitignore and .nojekyll which are for repo management