algo.farrington {surveillance}R Documentation

Surveillance for a time series using the Farrington procedure.

Description

The function takes range values of the time series counts and for each uses a GLM to predict the number of counts according to the procedure by Farrington et. al. This is then compared to the observed number of counts and in case an exceedance of the confidence interval calculated is seen 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"))

Arguments

disProgObj object of class disProgObj (including the observed and the state chain)
control Control object
    range
    Specifies the index of all timepoints which should be tested. If range is NULL the maximum number of possible weeks is used.
    b
    how many years back in time to include when forming the base counts.
    w
    windows size, i.e. number of weeks to include before and after the current week
    reweight
    Boolean specifying whether to perform reweight step
    trend
    If true a trend is included and kept in case the conditions in the Farrington et. al. paper are met (see the results). If false then NO trend is fit.
    verbose
    show extra debugging information
    plot
    shows the final GLM model fit graphically (use History|Recording to see all pictures)
    powertrans
    Power transformation to apply to the data. Use either "2/3" for skewness correction (Default), "1/2" for variance stabilizing transformation or "none" for no transformation
    alpha
    An approximate (two-sided) (1-α)% prediction interval is calculated
    limit54
    To avoid alarms in cases where the time series only has about 0-2 cases the algorithm uses the following heuristic criterion (see Section 3.8 of the Farrington paper) to protect against low counts: no alarm is sounded if fewer than cases=5 reports were received in the past period=4 weeks. limit54=c(cases,period) is a vector allowing the user to change these numbers. Note: As of version 0.9-7 The term "last" period of weeks includes the current week - otherwise no alarm is sounded for horrible large numbers if the four weeks before that are too low.

Details

The following steps are perfomed according to the Farrington et. al. 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

Value

An object of class SurvRes.

Author(s)

M. Höhle

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.

See Also

algo.farrington.fitGLM,algo.farrington.threshold

Examples

#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")

[Package surveillance version 1.1-2 Index]