Understanding and accurately estimating epidemiological delay distributions is important for public health policy. These estimates influence epidemic situational awareness, control strategies, and resource allocation. This package provides methods to address the key challenges in estimating these distributions, including truncation, interval censoring, and dynamical biases. These issues are frequently overlooked, resulting in biased conclusions. Built on top of ‘brms’, it allows for flexible modelling including time-varying spatial components and partially pooled estimates of demographic characteristics.
To learn more about epidist we recommend reading the vignettes in this
order:
- To get started, fitting a delay distribution to individual level data.
- For the models we support and the biases each one corrects, the model guide.
- For a worked example on real data, delays from symptom onset to positive test in an Ebola outbreak.
- For fitting to published estimates, and adjusting them for how each study was estimated, the meta model.
- For faster fits on larger data, approximate Bayesian inference.
- For questions that come up in use, the FAQ.
Installing the package
You can install the latest released version from CRAN using the standard
install.packages function:
install.packages("epidist")Alternatively, you can install the latest release from our r-universe repository:
install.packages("epidist", repos = "https://epinowcast.r-universe.dev")To install the development version from GitHub (warning! this version
may contain breaking changes and/or bugs), use the pak
package:
pak::pak("epinowcast/epidist")Similarly, you can install historical versions by specifying the release
tag (e.g.,
v0.4.0):
pak::pak("epinowcast/epidist@v0.4.0")Note: You can also use the above approach to install a specific commit if needed, for example, if you want to try out a specific unreleased feature, but not the absolute latest developmental version.
Installing CmdStan (optional)
By default epidist uses the rstan package for fitting models. If you
wish to use the cmdstanr package instead, you will need to install
CmdStan, which also
entails having a suitable C++ toolchain setup. We recommend using the
cmdstanr package to manage CmdStan.
The Stan team provides instructions in the Getting started with
cmdstanr
vignette, with other details and support at the package
site, but the brief version is:
# `cmdstanr` is not a dependency of `epidist`, so install it yourself
install.packages(
"cmdstanr",
repos = c("https://stan-dev.r-universe.dev", getOption("repos"))
)
# once `cmdstanr` is installed
cmdstanr::install_cmdstan()Note: You can speed up CmdStan installation using the cores argument.
If you are installing a particular version of epidist, you may also
need to install a past version of CmdStan, which you can do with the
version argument.
Organisation Website
Our organisation website includes links to other resources, guest posts, and seminar schedule for both upcoming and past recordings.
Community Forum
Our community forum has areas for
question and answer
and considering new methods and
tools, among others. If
you are generally interested in real-time analysis of infectious
disease, you may find this useful even if do not use epidist.
We welcome contributions and new contributors! We particularly appreciate help on identifying and identified issues. Please check and add to the issues, and/or add a pull request and see our contributing guide for more information.
Please briefly describe your problem and what output you expect in an issue.
If you have a question, please don’t open an issue. Instead, ask on our forum.
See our contributing guide for more information.
Please note that the epidist project is released with a Contributor
Code of
Conduct.
By contributing to this project, you agree to abide by its terms.
If you use epidist in your work, please consider citing it using
citation("epidist").
Package citation information
citation("epidist")
To cite package 'epidist' in publications use:
Howes A, Park S, Abbott S (2026). _epidist: Estimate Epidemiological
Delay Distributions with 'brms'_. doi:10.5281/zenodo.14213017
<https://doi.org/10.5281/zenodo.14213017>.
A BibTeX entry for LaTeX users is
@Manual{,
title = {epidist: Estimate Epidemiological Delay Distributions with 'brms'},
author = {Adam Howes and Sang Woo Park and Sam Abbott},
year = {2026},
doi = {10.5281/zenodo.14213017},
}If using our methodology, or the methodology on which ours is based, please cite the relevant papers. This may include:
- Estimating epidemiological delay distributions for infectious diseases by Park et al. (2024) – if using the latent model
- Best practices for estimating and reporting epidemiological delay distributions of infectious diseases using public health surveillance and healthcare data by Charniga et al. (2024)
If using the marginal model, please also cite the
primarycensored package
using citation("primarycensored").
All contributions to this project are gratefully acknowledged using the
allcontributors package
following the allcontributors
specification. Contributions of any kind are welcome!
seabbs, athowes, parksw3, sbfnk, cherz4, damonbayer, medewitt, kcharniga
kgostic, TimTaylor, jamesmbaazam, jonathonmellor, RodrigoZepeda
pearsonca, SamuelBrand1, zsusswein, oswaldogressani, DrAuxetic, mark-burdon
