
The surveil R package provides time series models for routine public health surveillance tasks: model time trends in mortality or disease incidence rates to make inferences about levels of risk, cumulative and period percent change, age-standardized rates, and health inequalities.
surveil is an interface to Stan, a state-of-the-art platform for Bayesian inference. For analysis of spatial health data see the geostan R package.
surveil is available on CRAN; install from R using:
install.packages("surveil")
Review the package vignettes to get started:
vignette("surveil-demo"): An introduction to public health modeling with surveilvignette("age-standardization"): How to age-standardize surveil model results vignette("measuring-inequality"): Assessing pairwise health differences with measures of inequalityvignette("surveil-mcmc"): A brief introduction to Markov chain Monte Carlo (MCMC) with surveilAlso see the online documentation.
Model time series data of mortality or disease incidence by loading the surveil package into R together with disease surveillance data. Tables exported from CDC WONDER are automatically in the correct format.
library(surveil) library(knitr) data(cancer) kable(head(cancer), booktabs = TRUE, caption = "Table 1. A glimpse of cancer surveillance data")
Model trends in risk and easily view functions of risk estimates, such as cumulative percent change:
fit <- stan_rw(data = cancer, time = Year, group = Age) fit_apc <- apc(fit) plot(fit_apc, cumulative = TRUE)
Cumulative percent change in US cancer incidence by age group
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.