Skip to content

Case studies

These worked examples build complete models from the package's components and fit them to real epidemic surveillance data with Turing, recreating published analyses. Each one is self-contained and runs when the documentation is built, so the numbers you see are produced by the code on the page.

They progress from a single renewal model to a layered observation process and then to a mechanistic compartmental model:

  • Renewal model with negative-binomial reporting — a time-varying reproduction number driven by an autoregressive latent process, mapped to infections through the renewal equation and observed with overdispersed counts. This is the canonical renewal model of Cori et al. [1] and Mishra et al. [2].

  • Reporting delays and day-of-week effects — the same renewal core wrapped in an observation model that convolves infections through reporting delays and modulates them with a day-of-week reporting pattern, in the style of real-time estimation tools [3].

  • Real-time nowcasting: correcting right-truncation — the same renewal core fit to a right-truncated real-time snapshot, contrasting a naive fit (which shows the artefactual recent- down-turn) with a RightTruncate-corrected fit that removes it, again following real-time estimation practice [3].

  • Multiple observation streams: cases, deaths, and strata — one renewal infection process observed through several named streams with a single Split construct, covering parallel streams (cases and deaths off shared infections), a cascade (deaths downstream of reported cases, achieved by placing the split lower in the pipeline), and data-driven strata (one stream per age band), motivated by the differing biases of surveillance streams [4].

  • An SIR compartmental model — an alternative infection process where dynamics come from an ordinary differential equation solved by the SciML stack [5], following the Bayesian compartmental-inference example of Chatzilena et al. [6].

Every example uses the same recipe: assemble components into a model, call as_turing_model (directly or through IDModel / IDProblem), simulate by passing missing data, and fit by passing observed data and sampling. Because the components share one interface, you swap a modelling assumption by swapping a struct — the Composable design page explains the mechanism.

References

The methods these case studies recreate and adapt are described in the following works. Individual pages link back to the relevant entries here.

  1. A. Cori, N. M. Ferguson, C. Fraser and S. Cauchemez. A new framework and software to estimate time-varying reproduction numbers during epidemics. American Journal of Epidemiology 178, 1505–1512 (2013).

  2. S. Mishra, T. Berah, T. A. Mellan, H. J. Unwin, M. A. Vollmer, K. V. Parag, A. Gandy, S. Flaxman and S. Bhatt. On the derivation of the renewal equation from an age-dependent branching process: an epidemic modelling perspective, arXiv preprint arXiv:2006.16487 (2020).

  3. S. Abbott, J. Hellewell, R. N. Thompson, K. Sherratt, H. P. Gibbs, N. I. Bosse, J. D. Munday, S. Meakin, E. L. Doughty, J. Y. Chun and others. Estimating the time-varying reproduction number of SARS-CoV-2 using national and subnational case counts. Wellcome Open Research 5, 112 (2020).

  4. K. Sherratt, S. Abbott, S. R. Meakin, J. Hellewell, J. D. Munday, N. Bosse, M. Jit and S. Funk. Exploring surveillance data biases when estimating the reproduction number: with insights into subpopulation transmission of COVID-19 in England. Philosophical Transactions of the Royal Society B 376, 20200283 (2021).

  5. C. Rackauckas and Q. Nie. DifferentialEquations.jl – a performant and feature-rich ecosystem for solving differential equations in Julia. Journal of Open Research Software 5 (2017).

  6. A. Chatzilena, E. van Leeuwen, O. Ratmann, M. Baguelin and N. Demiris. Contemporary statistical inference for infectious disease models using Stan. Epidemics 29, 100367 (2019).

  7. K. Charniga, S. W. Park, A. R. Akhmetzhanov, A. Cori, J. Dushoff, S. Funk and others. Best practices for estimating and reporting epidemiological delay distributions of infectious diseases. PLoS Computational Biology 20, e1012520 (2024).

  8. T. E. Loman, Y. Ma, V. Ilin, S. Gowda, N. Korsbo, N. Yewale, C. Rackauckas and S. A. Isaacson. Catalyst: Fast and flexible modeling of reaction networks. PLoS Computational Biology 19, e1011530 (2023).