This repository contains the code and data required to reproduce the wastewater sampling example in our paper A decision-theoretic framework for uncertainty quantification in epidemiological modelling.
Reported case data (A), wastewater data (B), and population covered by wastewater catchment areas (C) for Aotearoa New Zealand between 1 January 2023 and 1 March 2023. The light blue region in panel (C) represents the population from which missing data could be sampled. The daily uncertainty about $R_t$ from the model fit to reported case data only (orange), from the model fit to both reported case data and observed wastewater data (dark blue), and the expected uncertainty after sampling wastewater data from the entire population every day (light blue) are shown in panel (D). Thin light blue lines show the posterior variance of $R_t$ from individual simulations of hypothetical data, demonstrating that even though the expected uncertainty reduction is positive (as we satisfy the coherence condition), uncertainty about $R_t$ could still plausibly increase. Uncertainty increases at the start and end of the time period as a result of fewer data points being available to fit the model.
The SMC + PMMH scripts are adapted from previous work on sequential Monte Carlo methods for renewal models:
Steyn, N., Parag, K. V., Thompson, R. N., & Donnelly, C. A. A primer on inference and prediction with epidemic renewal models using sequential Monte Carlo methods. Statistics in Medicine. (2025). https://doi.org/10.1002/sim.70204.
We also highlight the corresponding website for this work, which contains additional resources and explanations, including downloadable interactive notebooks.
The wastewater model is adapted from:
Watson, L. M., Plank, M. J., et al. Jointly estimating epidemiological dynamics of Covid-19 from case and wastewater data in Aotearoa New Zealand. Communications Medicine. (2024). https://doi.org/10.1038/s43856-024-00570-3.
The original code and data for this work can be found in the corresponding GitHub repository.
The wastewater sampling data were collected and provided by the New Zealand Institute for Public Health and Forensic Science (formerly the Institute of Environmental Science and Research):
New Zealand Institute for Public Health and Forensic Science Ltd (PHF Science). Wastewater COVID-19 surveillance programme. (Accessed May 2025). https://github.com/ESR-NZ/covid_in_wastewater.
Reported cases for Aotearoa New Zealand were collected and reported by the Ministry of Health:
New Zealand Ministry of Health. New Zealand COVID-19 data. (Accessed May 2025). https://github.com/minhealthnz/nz-covid-data.