surveil: Time Series Models for Disease Surveillance

Fits time series models for routine disease surveillance tasks and returns probability distributions for a variety of quantities of interest, including age-standardized rates, period and cumulative percent change, and measures of health inequality. Calculates Theil's index to measure inequality among multiple groups, and can be extended to measure inequality across multiple groups nested within geographies. Inference is completed using Markov chain Monte Carlo via the Stan modeling language. The models are appropriate for count data such as disease incidence and mortality data, employing a Poisson or binomial likelihood and the first-difference (random-walk) prior for unknown risk. Optionally add a covariance matrix for multiple, correlated time series models. References: Donegan, Hughes, and Lee (2022) <doi:10.2196/34589>; Stan Development Team (2021) <>; Theil (1972, ISBN:0-444-10378-3).

Version: 0.2.2
Depends: R (≥ 3.5.0)
Imports: rstantools (≥ 2.1.1), methods, Rcpp (≥ 0.12.0), RcppParallel (≥ 5.0.1), rstan (≥ 2.26.0), tidybayes (≥ 3.0.0), dplyr (≥ 1.0.7), rlang (≥ 0.4.0), tidyr (≥ 1.1.0), ggplot2 (≥ 3.0.0), gridExtra (≥ 2.0), scales (≥ 0.4.0), ggdist (≥ 3.0.0)
LinkingTo: BH (≥ 1.66.0), Rcpp (≥ 0.12.0), RcppEigen (≥, RcppParallel (≥ 5.0.1), rstan (≥ 2.26.0), StanHeaders (≥ 2.26.0)
Suggests: rmarkdown, knitr, testthat
Published: 2023-10-03
Author: Connor Donegan ORCID iD [aut, cre]
Maintainer: Connor Donegan <connor.donegan at>
License: GPL (≥ 3)
NeedsCompilation: yes
SystemRequirements: GNU make
Citation: surveil citation info
Materials: README NEWS
CRAN checks: surveil results


Reference manual: surveil.pdf
Vignettes: Age-standardized rates
Public health surveillance with surveil
Markov chain Monte Carlo (MCMC): analysis and diagnostics


Package source: surveil_0.2.2.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): surveil_0.2.2.tgz, r-oldrel (arm64): surveil_0.2.2.tgz, r-release (x86_64): surveil_0.2.2.tgz, r-oldrel (x86_64): surveil_0.2.2.tgz
Old sources: surveil archive


Please use the canonical form to link to this page.