Skip to contents
surveillance-package surveillance
surveillance: Temporal and Spatio-Temporal Modeling and Monitoring of Epidemic Phenomena

Data class “sts”

disProg2sts() sts2disProg()
Convert disProg object to sts and vice versa
linelist2sts()
Convert Dates of Individual Case Reports into a Time Series of Counts
sts()
Class "sts" -- surveillance time series
aggregate(<sts>)
Aggregate an "sts" Object Over Time or Across Units
stsBP-class coerce,sts,stsBP-method
Class "stsBP" -- a class inheriting from class sts which allows the user to store the results of back-projecting or nowcasting surveillance time series
stsNC-class reportingTriangle reportingTriangle,stsNC-method delayCDF delayCDF,stsNC-method score score,stsNC-method predint predint,stsNC-method coerce,sts,stsNC-method
Class "stsNC" -- a class inheriting from class sts which allows the user to store the results of back-projecting surveillance time series
animate_nowcasts()
Animate a Sequence of Nowcasts
alarms alarms upperbound upperbound control control epoch epoch observed observed population population multinomialTS multinomialTS neighbourhood neighbourhood
Generic Functions to Access "sts" Slots
`[`(<sts>)
Subsetting "sts" Objects
animate(<sts>)
Animated Maps and Time Series of Disease Counts or Incidence
autoplot.sts()
Time-Series Plots for "sts" Objects Using ggplot2
tidy.sts()
Convert an "sts" Object to a Data Frame in Long (Tidy) Format
plot(<sts>,<missing>)
Plot Methods for Surveillance Time-Series Objects
stsplot_space()
Map of Disease Counts/Incidence accumulated over a Given Period
stsplot_time() stsplot_time1() stsplot_alarm()
Time-Series Plots for "sts" Objects
toLatex(<sts>)
toLatex-Method for "sts" Objects

Prospective outbreak detection

algo.bayesLatestTimepoint() algo.bayes() algo.bayes1() algo.bayes2() algo.bayes3()
The Bayes System
algo.call()
Query Transmission to Specified Surveillance Algorithm
algo.cdcLatestTimepoint() algo.cdc()
The CDC Algorithm
algo.compare()
Comparison of Specified Surveillance Systems using Quality Values
algo.cusum()
CUSUM method
algo.farrington() farrington()
Surveillance for Count Time Series Using the Classic Farrington Method
algo.farrington.assign.weights()
Assign weights to base counts
algo.farrington.fitGLM() algo.farrington.fitGLM.fast() algo.farrington.fitGLM.populationOffset()
Fit Poisson GLM of the Farrington procedure for a single time point
algo.farrington.threshold()
Compute prediction interval for a new observation
algo.glrnb() algo.glrpois()
Count Data Regression Charts
algo.hmm()
Hidden Markov Model (HMM) method
algo.outbreakP()
Semiparametric surveillance of outbreaks
algo.quality()
Computation of Quality Values for a Surveillance System Result
algo.rkiLatestTimepoint() algo.rki() algo.rki1() algo.rki2() algo.rki3()
The system used at the RKI
algo.rogerson()
Modified CUSUM method as proposed by Rogerson and Yamada (2004)
algo.summary()
Summary Table Generation for Several Disease Chains
print(<algoQV>)
Print Quality Value Object
wrap.algo() bayes() rki() cusum() glrpois() glrnb() outbreakP()
Multivariate Surveillance through independent univariate algorithms
boda()
Bayesian Outbreak Detection Algorithm (BODA)
LRCUSUM.runlength()
Run length computation of a CUSUM detector
categoricalCUSUM()
CUSUM detector for time-varying categorical time series
pairedbinCUSUM() pairedbinCUSUM.runlength()
Paired binary CUSUM and its run-length computation
arlCusum()
Calculation of Average Run Length for discrete CUSUM schemes
find.kh()
Determine the k and h values in a standard normal setting
findH() hValues()
Find decision interval for given in-control ARL and reference value
findK()
Find Reference Value
earsC()
Surveillance for a count data time series using the EARS C1, C2 or C3 method and its extensions
farringtonFlexible()
Surveillance for Univariate Count Time Series Using an Improved Farrington Method
stcd()
Spatio-temporal cluster detection
sim.pointSource()
Simulate Point-Source Epidemics
sim.seasonalNoise()
Generation of Background Noise for Simulated Timeseries
sts_creation()
Simulate Count Time Series with Outbreaks
refvalIdxByDate()
Compute indices of reference value using Date class

Modeling reporting delays

backprojNP()
Non-parametric back-projection of incidence cases to exposure cases using a known incubation time as in Becker et al (1991)
nowcast()
Adjust a univariate time series of counts for observed but-not-yet-reported events
bodaDelay()
Bayesian Outbreak Detection in the Presence of Reporting Delays
sts_observation()
Create an sts object with a given observation date

hhh4: endemic-epidemic time series of counts

hhh4()
Fitting HHH Models with Random Effects and Neighbourhood Structure
W_powerlaw() W_np()
Power-Law and Nonparametric Neighbourhood Weights for hhh4-Models
getNEweights() coefW()
Extract Neighbourhood Weights from a Fitted hhh4 Model
fe() ri()
Specify Formulae in a Random Effects HHH Model
print(<hhh4>) summary(<hhh4>) coef(<hhh4>) fixef(<hhh4>) ranef(<hhh4>) coeflist(<hhh4>) formula(<hhh4>) nobs(<hhh4>) logLik(<hhh4>) vcov(<hhh4>) confint(<hhh4>) residuals(<hhh4>)
Print, Summary and other Standard Methods for "hhh4" Objects
plot(<hhh4>) plotHHH4_fitted() plotHHH4_fitted1() plotHHH4_season() getMaxEV_season() plotHHH4_maxEV() getMaxEV() plotHHH4_maps() plotHHH4_ri() plotHHH4_neweights()
Plots for Fitted hhh4-models
predict(<hhh4>)
Predictions from a hhh4 Model
simulate(<hhh4>)
Simulate "hhh4" Count Time Series
plot(<hhh4sims>) aggregate(<hhh4sims>) as.hhh4simslist() plot(<hhh4simslist>) aggregate(<hhh4simslist>) plotHHH4sims_size() plotHHH4sims_time() plotHHH4sims_fan()
Plot Simulations from "hhh4" Models
scores(<hhh4sims>) scores(<hhh4simslist>)
Proper Scoring Rules for Simulations from hhh4 Models
update(<hhh4>)
update a fitted "hhh4" model
oneStepAhead() quantile(<oneStepAhead>) confint(<oneStepAhead>) plot(<oneStepAhead>) scores(<oneStepAhead>) calibrationTest(<oneStepAhead>) pit(<oneStepAhead>) scores(<hhh4>) calibrationTest(<hhh4>) pit(<hhh4>)
Predictive Model Assessment for hhh4 Models
addSeason2formula()
Add Harmonics to an Existing Formula
calibrationTest()
Calibration Tests for Poisson or Negative Binomial Predictions
scores() logs() rps() dss() ses()
Proper Scoring Rules for Poisson or Negative Binomial Predictions
makeControl()
Generate control Settings for an hhh4 Model

twinstim: endemic-epidemic spatio-temporal point process

as.epidataCS() print(<epidataCS>) nobs(<epidataCS>) head(<epidataCS>) tail(<epidataCS>) `[`(<epidataCS>) subset(<epidataCS>) marks(<epidataCS>) summary(<epidataCS>) print(<summary.epidataCS>) as.stepfun(<epidataCS>) getSourceDists()
Continuous Space-Time Marked Point Patterns with Grid-Based Covariates
epidataCS2sts() as.epidata(<epidataCS>)
Conversion (aggregation) of "epidataCS" to "epidata" or "sts"
animate(<epidataCS>)
Spatio-Temporal Animation of a Continuous-Time Continuous-Space Epidemic
permute.epidataCS()
Randomly Permute Time Points or Locations of "epidataCS"
plot(<epidataCS>) epidataCSplot_time() epidataCSplot_space()
Plotting the Events of an Epidemic over Time and Space
update(<epidataCS>)
Update method for "epidataCS"
glm_epidataCS()
Fit an Endemic-Only twinstim as a Poisson-glm
untie()
Randomly Break Ties in Data
R0() simpleR0()
Computes reproduction numbers from fitted models
residuals(<twinSIR>) residuals(<twinstim>) residuals(<simEpidataCS>)
Extract Cox-Snell-like Residuals of a Fitted Point Process
twinstim()
Fit a Two-Component Spatio-Temporal Point Process Model
epitest() coef(<epitest>) plot(<epitest>)
Permutation Test for Space-Time Interaction in "twinstim"
siaf.constant() siaf.step() siaf.gaussian() siaf.exponential() siaf.powerlaw() siaf.powerlaw1() siaf.powerlawL() siaf.student() tiaf.constant() tiaf.step() tiaf.exponential()
Temporal and Spatial Interaction Functions for twinstim
iafplot()
Plot the Spatial or Temporal Interaction Function of a twimstim
intensityplot(<twinstim>) intensityplot(<simEpidataCS>) intensity.twinstim()
Plotting Intensities of Infection over Time or Space
print(<twinstim>) summary(<twinstim>) coeflist(<twinstim>) vcov(<twinstim>) logLik(<twinstim>) nobs(<twinstim>) print(<summary.twinstim>) toLatex(<summary.twinstim>) xtable(<summary.twinstim>)
Print, Summary and Extraction Methods for "twinstim" Objects
plot(<twinstim>)
Plot methods for fitted twinstim's
profile(<twinstim>)
Profile Likelihood Computation and Confidence Intervals for twinstim objects
siaf()
Spatial Interaction Function Objects
simEndemicEvents()
Quick Simulation from an Endemic-Only twinstim
simEpidataCS() simulate(<twinstim>)
Simulation of a Self-Exciting Spatio-Temporal Point Process
stepComponent() add1(<twinstim>) drop1(<twinstim>)
Stepwise Model Selection by AIC
tiaf()
Temporal Interaction Function Objects
update(<twinstim>)
update-method for "twinstim"
knox() plot(<knox>)
Knox Test for Space-Time Interaction
stKtest() plot(<stKtest>)
Diggle et al (1995) K-function test for space-time clustering
checkResidualProcess()
Check the residual process of a fitted twinSIR or twinstim

twinSIR: multivariate temporal point process

as.epidata() print(<epidata>) `[`(<epidata>) update(<epidata>)
Continuous-Time SIR Event History of a Fixed Population
animate(<summary.epidata>) animate(<epidata>)
Spatio-Temporal Animation of an Epidemic
intersperse()
Impute Blocks for Extra Stops in "epidata" Objects
plot(<summary.epidata>) plot(<epidata>) stateplot()
Plotting the Evolution of an Epidemic
summary(<epidata>) print(<summary.epidata>)
Summarizing an Epidemic
residuals(<twinSIR>) residuals(<twinstim>) residuals(<simEpidataCS>)
Extract Cox-Snell-like Residuals of a Fitted Point Process
twinSIR()
Fit an Additive-Multiplicative Intensity Model for SIR Data
plot(<twinSIR>) intensityplot(<twinSIR>) intensityplot(<simEpidata>)
Plotting Paths of Infection Intensities for twinSIR Models
print(<twinSIR>) summary(<twinSIR>) AIC(<twinSIR>) extractAIC(<twinSIR>) vcov(<twinSIR>) logLik(<twinSIR>) print(<summary.twinSIR>)
Print, Summary and Extraction Methods for "twinSIR" Objects
profile(<twinSIR>)
Profile Likelihood Computation and Confidence Intervals
simEpidata() simulate(<twinSIR>)
Simulation of Epidemic Data
checkResidualProcess()
Check the residual process of a fitted twinSIR or twinstim

Datasets

MMRcoverageDE
MMR coverage levels in the 16 states of Germany
abattoir
Abattoir Data
campyDE
Campylobacteriosis and Absolute Humidity in Germany 2002-2011
deleval
Surgical Failures Data
fluBYBW
Influenza in Southern Germany
ha ha.sts
Hepatitis A in Berlin
hagelloch
1861 Measles Epidemic in the City of Hagelloch, Germany
hepatitisA
Hepatitis A in Germany
husO104Hosp
Hospitalization date for HUS cases of the STEC outbreak in Germany, 2011
imdepi
Occurrence of Invasive Meningococcal Disease in Germany
imdepifit
Example twinstim Fit for the imdepi Data
influMen
Influenza and meningococcal infections in Germany, 2001-2006
m1
RKI SurvStat Data
measles.weser measlesWeserEms
Measles in the Weser-Ems region of Lower Saxony, Germany, 2001-2002
measlesDE
Measles in the 16 states of Germany
meningo.age
Meningococcal infections in France 1985-1997
momo
Danish 1994-2008 all-cause mortality data for eight age groups
rotaBB
Rotavirus cases in Brandenburg, Germany, during 2002-2013 stratified by 5 age categories
salmAllOnset
Salmonella cases in Germany 2001-2014 by data of symptoms onset
salmHospitalized
Hospitalized Salmonella cases in Germany 2004-2014
salmNewport
Salmonella Newport cases in Germany 2004-2013
salmonella.agona
Salmonella Agona cases in the UK 1990-1995
shadar
Salmonella Hadar cases in Germany 2001-2006
stsNewport
Salmonella Newport cases in Germany 2001-2015

Utilities

Plotting

animate()
Generic animation of spatio-temporal objects
intensityplot()
Plot Paths of Point Process Intensities
ks.plot.unif()
Plot the ECDF of a uniform sample with Kolmogorov-Smirnov bounds
fanplot()
Fan Plot of Forecast Distributions
addFormattedXAxis()
Formatted Time Axis for "sts" Objects
layout.labels() layout.scalebar()
Layout Items for spplot
pit()
Non-Randomized Version of the PIT Histogram (for Count Data)
magic.dim()
Compute Suitable k1 x k2 Layout for Plotting

Spatial utilities

discpoly()
Polygonal Approximation of a Disc/Circle
poly2adjmat()
Derive Adjacency Structure of "SpatialPolygons"
polyAtBorder()
Indicate Polygons at the Border
intersectPolyCircle()
Intersection of a Polygonal and a Circular Domain
unionSpatialPolygons()
Compute the Unary Union of "SpatialPolygons"
marks
Import from package spatstat.geom
multiplicity
Import from package spatstat.geom
multiplicity(<Spatial>)
Count Number of Instances of Points
nbOrder()
Determine Neighbourhood Order Matrix from Binary Adjacency Matrix
zetaweights()
Power-Law Weights According to Neighbourhood Order

Other utilities

all.equal(<twinstim>) all.equal(<hhh4>)
Test if Two Model Fits are (Nearly) Equal
formatDate()
Convert Dates to Character (Including Quarter Strings)
formatPval()
Pretty p-Value Formatting
bestCombination()
Partition of a number into two factors
primeFactors()
Prime Number Factorization
clapply()
Conditional lapply
plapply()
Verbose and Parallel lapply
coeflist()
List Coefficients by Model Component
isoWeekYear()
Find ISO Week and Year of Date Objects
permutationTest()
Monte Carlo Permutation Test for Paired Individual Scores
surveillance.options() reset.surveillance.options()
Options of the surveillance Package
ranef fixef
Import from package nlme
anscombe.residuals()
Compute Anscombe Residuals

Deprecated functions

algo.twins()
Fit a Two-Component Epidemic Model using MCMC
plot(<atwins>)
Plots for Fitted algo.twins Models