algo.cusum: CUSUM method

Description Usage Arguments Details Value Author(s) References Examples

Description

Approximate one-side CUSUM method for a Poisson variate based on the cumulative sum of the deviation between a reference value k and the transformed observed values. An alarm is raised if the cumulative sum equals or exceeds a prespecified decision boundary h. The function can handle time varying expectations.

Usage

1
2
  algo.cusum(disProgObj, control = list(range = range, k = 1.04, h = 2.26, 
             m = NULL, trans = "standard", alpha = NULL))

Arguments

disProgObj

object of class disProg (including the observed and the state chain)

control

control object:

range

determines the desired time points which should be evaluated

k

is the reference value

h

the decision boundary

m

how to determine the expected number of cases – the following arguments are possible

numeric

a vector of values having the same length as range. If a single numeric value is specified then this value is replicated length(range) times.

NULL

A single value is estimated by taking the mean of all observations previous to the first range value.

"glm"

A GLM of the form

\log(m_t) = α + β t + ∑_{s=1}^S (γ_s \sin(ω_s t) + δ_s \cos(ω_s t)),

where ω_s = 2π/52 s are the Fourier frequencies is fitted. Then this model is used to predict the range values.

trans

one of the following transformations (warning: anscombe and negbin transformations are experimental)

rossi

standardized variables z3 as proposed by Rossi

standard

standardized variables z1 (based on asympotic normality)

anscombe

anscombe residuals – experimental

anscombe2nd

anscombe residuals as in Pierce and Schafer (1986) based on 2nd order approximation of E(X) – experimental

pearsonNegBin

compute Pearson residuals for NegBin – experimental

anscombeNegBin

anscombe residuals for NegBin – experimental

none

no transformation

alpha

parameter of the negative binomial distribution, s.t. the variance is m+α *m^2

Details

This implementation is experimental, but will not be developed further.

Value

survRes

algo.cusum gives a list of class survRes which includes the vector of alarm values for every timepoint in range and the vector of cumulative sums for every timepoint in range for the system specified by k and h, the range and the input object of class disProg.

The upperbound entry shows for each time instance the number of diseased individuals it would have taken the cusum to signal. Once the CUSUM signals no resetting is applied, i.e. signals occurs until the CUSUM statistic again returns below the threshold.

The control$m.glm entry contains the fitted glm object, if the original argument was "glm".

Author(s)

M. Paul and M. Höhle

References

G. Rossi, L. Lampugnani and M. Marchi (1999), An approximate CUSUM procedure for surveillance of health events, Statistics in Medicine, 18, 2111–2122

D. A. Pierce and D. W. Schafer (1986), Residuals in Generalized Linear Models, Journal of the American Statistical Association, 81, 977–986

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
    # Xi ~ Po(5), i=1,...,500
    disProgObj <- create.disProg(week=1:500, observed= rpois(500,lambda=5),
                                    state=rep(0,500))
    # there should be no alarms as mean doesn't change
    res <- algo.cusum(disProgObj, control = list(range = 100:500,trans="anscombe"))
    plot(res)
        
    # simulated data 
    disProgObj <- sim.pointSource(p = 1, r = 1, length = 250,
                              A = 0, alpha = log(5), beta = 0, phi = 10,
                              frequency = 10, state = NULL, K = 0)                           
    plot(disProgObj)
    
    # Test week 200 to 250 for outbreaks
    surv <- algo.cusum(disProgObj, control = list(range = 200:250))
    plot(surv)

jimhester/surveillance documentation built on May 19, 2019, 10:33 a.m.