algo.cusum_with_reset.Rd
Implementation of the CUSUM algorithm retrieved from the surveillance package and adapted so that after a signal was triggered the cusum is set to 0 Parameters are inherited from surveillance algo.cusum
algo.cusum_with_reset(
disProgObj,
control = list(range = range, k = 1.04, h = 2.26, m = NULL, trans = "standard", alpha =
NULL)
)
object of class disProg (including the observed and the state chain)
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)
= \alpha + \beta t + \sum_{s=1}^S (\gamma_s
\sin(\omega_s t) + \delta_s \cos(\omega_s t)),$$
where \(\omega_s = \frac{2\pi}{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 asymptotic normality) - This is the default.
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+\alpha *m^2\)