Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

findH

Find decision interval for given in-control ARL and reference value


Description

Function to find a decision interval h* for given reference value k and desired ARL γ so that the average run length for a Poisson or Binomial CUSUM with in-control parameter θ_0, reference value k and is approximately γ, i.e. \Big| \frac{ARL(h^*) -γ}{γ} \Big| < ε, or larger, i.e. ARL(h^*) > γ .

Usage

findH(ARL0, theta0, s = 1, rel.tol = 0.03, roundK = TRUE,
      distr = c("poisson", "binomial"), digits = 1, FIR = FALSE, ...)

hValues(theta0, ARL0, rel.tol=0.02, s = 1, roundK = TRUE, digits = 1,
        distr = c("poisson", "binomial"), FIR = FALSE, ...)

Arguments

ARL0

desired in-control ARL γ

theta0

in-control parameter θ_0

s

change to detect, see details

distr

"poisson" or "binomial"

rel.tol

relative tolerance, i.e. the search for h* is stopped if \Big| \frac{ARL(h^*) -γ}{γ} \Big| < rel.tol

digits

the reference value k and the decision interval h are rounded to digits decimal places

roundK

passed to findK

FIR

if TRUE, the decision interval that leads to the desired ARL for a FIR CUSUM with head start \frac{\code{h}}{2} is returned

...

further arguments for the distribution function, i.e. number of trials n for binomial cdf

Details

The out-of-control parameter used to determine the reference value k is specified as:

θ_1 = λ_0 + s √{λ_0}

for a Poisson variate X \sim Po(λ)

θ_1 = \frac{s π_0}{1+(s-1) π_0}

for a Binomial variate X \sim Bin(n, π)

Value

findH returns a vector and hValues returns a matrix with elements

theta0

in-control parameter

h

decision interval

k

reference value

ARL

ARL for a CUSUM with parameters k and h

rel.tol

corresponds to \Big| \frac{ARL(h) -γ}{γ} \Big|


surveillance

Temporal and Spatio-Temporal Modeling and Monitoring of Epidemic Phenomena

v1.19.1
GPL-2
Authors
Michael H<f6>hle [aut, ths] (<https://orcid.org/0000-0002-0423-6702>), Sebastian Meyer [aut, cre] (<https://orcid.org/0000-0002-1791-9449>), Michaela Paul [aut], Leonhard Held [ctb, ths], Howard Burkom [ctb], Thais Correa [ctb], Mathias Hofmann [ctb], Christian Lang [ctb], Juliane Manitz [ctb], Andrea Riebler [ctb], Daniel Saban<e9>s Bov<e9> [ctb], Ma<eb>lle Salmon [ctb], Dirk Schumacher [ctb], Stefan Steiner [ctb], Mikko Virtanen [ctb], Wei Wei [ctb], Valentin Wimmer [ctb], R Core Team [ctb] (A few code segments are modified versions of code from base R)
Initial release
2021-03-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.