Skip to contents

The open-source R package surveillance implements statistical methods for the modeling and monitoring of epidemic phenomena based on (infectious disease) surveillance data. This includes time series of counts, proportions and categorical data as well as spatio-temporal point processes. Potential users are biostatisticians, epidemiologists and others working in, e.g., applied infectious disease epidemiology. However, applications could just as well originate from environmetrics, reliability engineering, econometrics or the social sciences.

Data class "sts"

The S4 class "sts" (surveillance time series), created via sts() or linelist2sts(), represents (multivariate) time series of counts. For areal time series, the class can also capture population fractions, a map, and a weight matrix. The "sts" class supersedes the "disProg" class.

For evaluation purposes, the package contains several datasets drawn from the SurvStat@RKI database maintained by the Robert Koch Institute in Germany.

Prospective outbreak detection

Salmon et al. (2016) provide an overall guide to the monitoring capabilities of surveillance. The paper is available as vignette("monitoringCounts") with the package. Further descriptions can be found in a book chapter by Höhle and Mazick (2010, preprint), and – slightly outdated – Höhle (2007) or vignette("surveillance").

  • Aberration detection in count data time series, e.g., farringtonFlexible().

  • Online change-point detection in categorical time series, e.g., categoricalCUSUM().
    A Markov Chain approximation for computing the run-length distribution of the proposed likelihood ratio CUSUMs is available as function LRCUSUM.runlength().

See the reference section on outbreak detection for the complete list of algorithms.

Modeling reporting delays

Endemic-epidemic modeling

Meyer et al. (2017) provide an overall guide to the spatio-temporal modeling capabilities of surveillance. The three regression-oriented modeling frameworks for epidemic phenomena are also described in corresponding package vignettes:

twinstim()
models a spatio-temporal point pattern of infective events
is described in vignette("twinstim")
fits data of class "epidataCS", which holds the observed events (with covariates) and exogenous covariates on a space-time grid (for the endemic component)
features a model-based epitest() for space-time interaction
twinSIR()
models the susceptible-infectious-recovered (SIR) event history of a fixed population
is described in vignette("twinSIR")
fits data of class "epidata"
hhh4()
models a (multivariate) time series of infectious disease counts
is described in vignette("hhh4_spacetime") for areal time series, and more generally in vignette("hhh4"), including the univariate case
fits data of class "sts"
Applications

These endemic-epidemic modelling frameworks have proven useful in a wide range of applications, including for COVID-19. We loosely maintain a list of related publications at https://surveillance.R-forge.R-project.org/applications_EE.html.

Installation

The stable release version of surveillance is hosted on the Comprehensive R Archive Network (CRAN) at https://CRAN.R-project.org/package=surveillance and can be installed via

install.packages("surveillance")

The development version of surveillance is hosted on R-Forge at https://R-Forge.R-project.org/projects/surveillance/ in a Subversion (SVN) repository. It can be installed via

install.packages("surveillance", repos = "https://R-Forge.R-project.org")

Feedback

Contributions are welcome! Please report bugs via e-mail to maintainer("surveillance").

Note that (large) new features are unlikely to be included in surveillance. Some extensions have already been developed in separate packages, for example hhh4contacts, HIDDA.forecasting, hhh4addon, and hhh4ZI.

Funding

The authors acknowledge financial support from the following institutions:

License

The surveillance package is free and open-source software, and you are welcome to redistribute it under the terms of the GNU General Public License, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.