sewma.arl {spc}R Documentation

Compute ARLs of EWMA control charts (variance charts)

Description

Computation of the (zero-state) Average Run Length (ARL) for different types of EWMA control charts (based on the sample variance S^2) monitoring normal variance.

Usage

sewma.arl(l,cl,cu,sigma,df,s2.on=TRUE,hs=NULL,sided="upper",r=40,qm=30)

Arguments

l

smoothing parameter lambda of the EWMA control chart.

cl

lower control limit of the EWMA control chart.

cu

upper control limit of the EWMA control chart.

sigma

true standard deviation.

df

actual degrees of freedom, corresponds to subgroup size (for known mean it is equal to the subgroup size, for unknown mean it is equal to subgroup size minus one.

s2.on

distinguishes between S^2 and S chart.

hs

so-called headstart (enables fast initial response); the default (NULL) yields the expected in-control value of S^2 (1) and S (c_4), respectively.

sided

distinguishes between one- and two-sided two-sided EWMA-S^2 control charts by choosing "upper" (upper chart without reflection at cl – the actual value of cl is not used), "Rupper" (upper chart with reflection at cl), "Rlower" (lower chart with reflection at cu), and "two" (two-sided chart), respectively.

r

dimension of the resulting linear equation system (highest order of the collocation polynomials).

qm

number of quadrature nodes for calculating the collocation definite integrals.

Details

sewma.arl determines the Average Run Length (ARL) by numerically solving the related ARL integral equation by means of collocation (Chebyshev polynomials).

Value

Returns a single value which resembles the ARL.

Author(s)

Sven Knoth

References

S. Knoth (2005), Accurate ARL computation for EWMA-S^2 control charts, Statistics and Computing 15, 341-352.

S. Knoth (2006), Computation of the ARL for CUSUM-S^2 schemes, Computational Statistics & Data Analysis 51, 499-512.

See Also

xewma.arl for zero-state ARL computation of EWMA control charts for monitoring normal mean.

Examples

## Knoth (2005)
## compare with Table 1 (p. 347): 249.9997
## Monte Carlo with 10^9 replicates: 249.9892 +/- 0.008
l <- .025
df <- 1
cu <- 1 + 1.661865*sqrt(l/(2-l))*sqrt(2/df)
sewma.arl(l,0,cu,1,df)

## ARL values for upper and lower EWMA charts with reflecting barriers
## (reflection at in-control level sigma0 = 1)
## examples from Knoth (2006), Tables 4 and 5

Ssewma.arl <- Vectorize("sewma.arl", "sigma")

## upper chart with reflection at sigma0=1 in Table 4
## original entries are
# sigma   ARL
# 1       100.0
# 1.01    85.3
# 1.02    73.4
# 1.03    63.5
# 1.04    55.4
# 1.05    48.7
# 1.1     27.9
# 1.2     12.9
# 1.3     7.86
# 1.4     5.57
# 1.5     4.30
# 2       2.11

## Not run: 
l <- 0.15
df <- 4
cu <- 1 + 2.4831*sqrt(l/(2-l))*sqrt(2/df)
sigmas <- c(1 + (0:5)/100, 1 + (1:5)/10, 2)
arls <- round(Ssewma.arl(l, 1, cu, sigmas, df, sided="Rupper", r=100), digits=2)
data.frame(sigmas, arls)
## End(Not run)

## lower chart with reflection at sigma0=1 in Table 5
## original entries are
# sigma   ARL
# 1       200.04
# 0.9     38.47
# 0.8     14.63
# 0.7     8.65
# 0.6     6.31

## Not run: 
l <- 0.115
df <- 5
cl <- 1 - 2.0613*sqrt(l/(2-l))*sqrt(2/df)
sigmas <- c((10:6)/10)
arls <- round(Ssewma.arl(l, cl, 1, sigmas, df, sided="Rlower", r=100), digits=2)
data.frame(sigmas, arls)
## End(Not run)

[Package spc version 0.6.8 Index]