algo.rogerson {surveillance} | R Documentation |
Modified CUSUM method as proposed by Rogerson and Yamada (2004)
Description
Modified Poisson CUSUM method that allows for a time-varying in-control parameter
as proposed by Rogerson and Yamada (2004). The
same approach can be applied to binomial data if
distribution="binomial"
is specified.
Usage
algo.rogerson(disProgObj, control = list(range = range,
theta0t = NULL, ARL0 = NULL, s = NULL, hValues = NULL,
distribution = c("poisson","binomial"), nt = NULL, FIR=FALSE,
limit = NULL, digits = 1))
Arguments
disProgObj |
object of class |
control |
list with elements
|
Details
The CUSUM for a sequence of Poisson or binomial
variates is computed as
where and
;
and
are time-varying
reference values and decision intervals.
An alarm is given at time
if
.
If FIR=TRUE
, the CUSUM starts
with a head start value at time
.
After an alarm is given, the FIR CUSUM starts again at this head start value.
The procedure after the CUSUM gives an alarm can be determined by limit
.
Suppose that the CUSUM signals at time , i.e.
.
For numeric values of
limit
, the CUSUM is bounded
above after an alarm is given,
i.e. is set to
.
Using
limit
=0 corresponds to
resetting to zero after an alarm as proposed in the original
formulation of the CUSUM. If
FIR=TRUE
,
is reset to
(i.e.
limit
= ).
If
limit=NULL
, no resetting occurs after an alarm is given.
Value
Returns an object of class survRes
with elements
alarm |
indicates whether the CUSUM signaled at time |
upperbound |
CUSUM values |
disProgObj |
|
control |
list with the alarm threshold |
Note
algo.rogerson
is a univariate CUSUM method. If the data are
available in several regions (i.e. observed
is a matrix),
multiple univariate CUSUMs are applied to each region.
References
Rogerson, P. A. and Yamada, I. Approaches to Syndromic Surveillance When Data Consist of Small Regional Counts. Morbidity and Mortality Weekly Report, 2004, 53/Supplement, 79-85
See Also
Examples
# simulate data (seasonal Poisson)
set.seed(123)
t <- 1:300
lambda <- exp(-0.5 + 0.4 * sin(2*pi*t/52) + 0.6 * cos(2*pi*t/52))
data <- sts(observed = rpois(length(lambda), lambda))
# determine a matrix with h values
hVals <- hValues(theta0 = 10:150/100, ARL0=500, s = 1, distr = "poisson")
# convert to legacy "disProg" class and apply modified Poisson CUSUM
disProgObj <- sts2disProg(data)
res <- algo.rogerson(disProgObj, control=c(hVals, list(theta0t=lambda, range=1:300)))
plot(res, xaxis.years = FALSE)