p.ewma.arl {spc} | R Documentation |
Compute ARLs of binomial EWMA p control charts
Description
Computation of the (zero-state) Average Run Length (ARL) at given rate p
.
Usage
p.ewma.arl(lambda, ucl, n, p, z0, sided="upper", lcl=NULL, d.res=1,
r.mode="ieee.round", i.mode="integer")
Arguments
lambda |
smoothing parameter of the EWMA p control chart. |
ucl |
upper control limit of the EWMA p control chart. |
n |
subgroup size. |
p |
(failure/success) rate. |
z0 |
so-called headstart (give fast initial response). |
sided |
distinguishes between one- and two-sided EWMA control chart by choosing |
lcl |
lower control limit of the EWMA p control chart; needed for two-sided design. |
d.res |
resolution (see details). |
r.mode |
round mode – allowed modes are |
i.mode |
type of interval center – |
Details
The monitored data follow a binomial distribution with size n
and failure/success probability p
.
The ARL values of the resulting EWMA control chart are determined by Markov chain approximation.
Here, the original EWMA values are approximated by
multiples of one over d.res
. Different ways of rounding (see r.mode
) to the next multiple are implemented.
Besides Gan's paper nothing is published about the numerical subtleties.
Value
Return single value which resemble the ARL.
Author(s)
Sven Knoth
References
F. F. Gan (1990), Monitoring observations generated from a binomial distribution using modified exponentially weighted moving average control chart, J. Stat. Comput. Simulation 37, 45-60.
S. Knoth and S. Steinmetz (2013),
EWMA p
charts under sampling by variables,
International Journal of Production Research 51, 3795-3807.
See Also
later.
Examples
## Gan (1990)
# Table 1
n <- 150
p0 <- .1
z0 <- n*p0
lambda <- c(1, .51, .165)
hu <- c(27, 22, 18)
p.value <- .1 + (0:20)/200
p.EWMA.arl <- Vectorize(p.ewma.arl, "p")
arl1.value <- round(p.EWMA.arl(lambda[1], hu[1], n, p.value, z0, r.mode="round"), digits=2)
arl2.value <- round(p.EWMA.arl(lambda[2], hu[2], n, p.value, z0, r.mode="round"), digits=2)
arl3.value <- round(p.EWMA.arl(lambda[3], hu[3], n, p.value, z0, r.mode="round"), digits=2)
arls <- matrix(c(arl1.value, arl2.value, arl3.value), ncol=length(lambda))
rownames(arls) <- p.value
colnames(arls) <- paste("lambda =", lambda)
arls
## Knoth/Steinmetz (2013)
n <- 5
p0 <- 0.02
z0 <- n*p0
lambda <- 0.3
ucl <- 0.649169922 ## in-control ARL 370.4 (determined with d.res = 2^14 = 16384)
res.list <- 2^(1:11)
arl.list <- NULL
for ( res in res.list ) {
arl <- p.ewma.arl(lambda, ucl, n, p0, z0, d.res=res)
arl.list <- c(arl.list, arl)
}
cbind(res.list, arl.list)