Reproducible parallel inference and simulation of stochastic state space models using odin, dust, and mcstate [version 2; peer review: 2 approved]
File(s)9dd872a8-c90f-4a3a-9071-146058d681f7_16466_-_john_lees_v2.pdf (4 MB)
Published version
Author(s)
Type
Journal Article
Abstract
State space models, including compartmental models, are used to model physical, biological and social phenomena in a broad range of scientific fields. A common way of representing the underlying processes in these models is as a system of stochastic processes which can be simulated forwards in time. Inference of model parameters based on observed time-series data can then be performed using sequential Monte Carlo techniques. However, using these methods for routine inference problems can be made difficult due to various engineering considerations: allowing model design to change in response to new data and ideas, writing model code which is highly performant, and incorporating all of this with up-to-date statistical techniques. Here, we describe a suite of packages in the R programming language designed to streamline the design and deployment of state space models, targeted at infectious disease modellers but suitable for other domains. Users describe their model in a familiar domain-specific language, which is converted into parallelised C++ code. A fast, parallel, reproducible random number generator is then used to run large numbers of model simulations in an efficient manner. We also provide standard inference and prediction routines, though the model simulator can be used directly if these do not meet the user's needs. These packages provide guarantees on reproducibility and performance, allowing the user to focus on the model itself, rather than the underlying computation. The ability to automatically generate high-performance code that would be tedious and time-consuming to write and verify manually, particularly when adding further structure to compartments, is crucial for infectious disease modellers. Our packages have been critical to the development cycle of our ongoing real-time modelling efforts in the COVID-19 pandemic, and have the potential to do the same for models used in a number of different domains.
Date Issued
2021-06-10
Date Acceptance
2021-06-07
Citation
Wellcome Open Research, 2021, 5
ISSN
2398-502X
Publisher
F1000Research
Journal / Book Title
Wellcome Open Research
Volume
5
Copyright Statement
© 2021 FitzJohn RG et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
License URL
Sponsor
Medical Research Council (MRC)
National Institute for Health Research
International Society for Infectious Diseases
Identifier
https://www.ncbi.nlm.nih.gov/pubmed/34761122
Grant Number
MR/R015600/1
NIHR200908
SBFF-2019-37324
Subjects
Compartmental models
Epidemiology
Infectious diseases
MCMC
Particle filter
SMC
State space model
Publication Status
Published
Coverage Spatial
England
Article Number
ARTN 288