Modified Poisson CUSUM method that allows for a time-varying in-control parameter
distribution="binomial"
is specified.
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))
Returns an object of class survRes
with elements
indicates whether the CUSUM signaled at time
CUSUM values
disProg
object
list with the alarm threshold
object of class disProg
that includes a matrix with
the observed number of counts
list with elements
vector of indices in the observed matrix of disProgObj
to monitor
matrix with in-control parameter, must be specified
desired average run length
change to detect, see findH
for further details
matrix with decision intervals h
for a sequence of
values theta0t
)
"poisson"
or "binomial"
optional matrix with varying sample sizes for the binomial CUSUM
a FIR CUSUM with head start TRUE
, otherwise no head start is used;
see details
numeric that determines the procedure after an alarm is given, see details
the reference value and decision interval are rounded to
digits
decimal places. Defaults to 1 and should correspond
to the number of digits used to compute hValues
The CUSUM for a sequence of Poisson or binomial
variates
If FIR=TRUE
, the CUSUM starts
with a head start value
The procedure after the CUSUM gives an alarm can be determined by limit
.
Suppose that the CUSUM signals at time limit
, the CUSUM is bounded
above after an alarm is given,
i.e. limit
=0 corresponds to
resetting FIR=TRUE
,
limit
=limit=NULL
, no resetting occurs after an alarm is given.
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
hValues
# 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)
Run the code above in your browser using DataLab