Learn R Programming

spc (version 0.3)

xgrsr.crit: Compute alarm thresholds for Shiryaev-Roberts schemes

Description

Computation of the alarm thresholds (alarm limits) for Shiryaev-Roberts schemes monitoring normal mean.

Usage

xgrsr.crit(k, L0, mu0 = 0, zr = 0, hs = NULL, sided = "one", r = 30)

Arguments

k
reference value of the Shiryaev-Roberts scheme.
L0
in-control ARL.
mu0
in-control mean.
zr
reflection border to enable the numerical algorithms used here.
hs
so-called headstart (give fast initial response). If hs=NULL, then the classical headstart -Inf is used (corresponds to 0 for the non-log scheme).
sided
distinguish between one- and two-sided schemes by choosing "one" and"two", respectively. Currently only one-sided schemes are implemented.
r
number of quadrature nodes, dimension of the resulting linear equation system is equal to r+1.

Value

  • Returns a single value which resembles the alarm limit g.

Details

xgrsr.crit determines the alarm threshold (alarm limit) for given in-control ARL L0 by applying secant rule and using xgrsr.arl().

References

G. Moustakides, A. Polunchenko, A. Tartakovsky (2009), Numerical comparison of CUSUM and Shiryaev-Roberts procedures for detectin changes in distributions, Communications in Statistics: Theory and Methods, to appear.

See Also

xgrsr.arl for zero-state ARL computation.

Examples

Run this code
## Table 4 from Moustakides et al. (2009)
## original values are
# gamma/L0  A/exp(g)
# 50        28.02
# 100       56.04
# 500       280.19
# 1000      560.37
# 5000      2801.75
# 10000     5603.7
theta <- 1
zr <- -6
r <- 100
Lxgrsr.crit  <- Vectorize("xgrsr.crit", "L0")
L0s <- c(50, 100, 500, 1000, 5000, 10000)
gs <- Lxgrsr.crit(theta/2, L0s, zr=zr, r=r)
data.frame(L0s, gs, A=round(exp(gs), digits=2))

Run the code above in your browser using DataLab