surveillance (version 1.12.1)

algo.farrington: Surveillance for a count data time series using the Farrington method.

Description

The function takes range values of the surveillance time series disProgObj and for each time point uses a GLM to predict the number of counts according to the procedure by Farrington et al. (1996). This is then compared to the observed number of counts. If the observation is above a specific quantile of the prediction interval, then an alarm is raised.

Usage

algo.farrington(disProgObj, control=list(range=NULL, b=3, w=3,
  reweight=TRUE,verbose=FALSE,alpha=0.01,trend=TRUE,limit54=c(5,4),
  powertrans="2/3",
  fitFun=c("algo.farrington.fitGLM.fast","algo.farrington.fitGLM",
           "algo.farrington.fitGLM.populationOffset")))

Arguments

disProgObj
object of class disProgObj (including the observed and the state time series.)
control
Control object [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Value

  • An object of class SurvRes.

encoding

latin1

source

A statistical algorithm for the early detection of outbreaks of infectious disease, Farrington, C.P., Andrews, N.J, Beale A.D. and Catchpole, M.A. (1996), J. R. Statist. Soc. A, 159, 547-563.

Details

The following steps are performed according to the Farrington et al. (1996) paper.
  1. fit of the initial model and initial estimation of mean and overdispersion.
  2. calculation of the weights omega (correction for past outbreaks)
  3. refitting of the model
  4. revised estimation of overdispersion
  5. rescaled model
  6. omission of the trend, if it is not significant
  7. repetition of the whole procedure
  8. calculation of the threshold value
  9. computation of exceedance score

See Also

algo.farrington.fitGLM,algo.farrington.threshold

Examples

Run this code
#Read Salmonella Agona data
data("salmonella.agona")

#Do surveillance for the last 100 weeks.
n <- length(salmonella.agona$observed)
#Set control parameters.
control <- list(b=4,w=3,range=(n-100):n,reweight=TRUE, verbose=FALSE,alpha=0.01)
res <- algo.farrington(salmonella.agona,control=control)
#Plot the result.
plot(res,disease="Salmonella Agona",method="Farrington")

#Generate Poisson counts and convert into an "sts" object
set.seed(123)
x <- rpois(520,lambda=1)
sts <- sts(observed=x, state=x*0, freq=52)

#Compare timing of the two possible fitters for algo.farrington (here using S4)
system.time( sts1 <- farrington(sts, control=list(range=312:520,
                       fitFun="algo.farrington.fitGLM.fast")))
system.time( sts2 <- farrington(sts, control=list(range=312:520,
                       fitFun="algo.farrington.fitGLM")))

#Check if results are the same
stopifnot(upperbound(sts1) == upperbound(sts2))

Run the code above in your browser using DataLab