Learn R Programming

spc (version 0.3)

xsewma.crit: Compute critical values of simultaneous EWMA control charts (mean and variance charts)

Description

Computation of the critical values (similar to alarm limits) for different types of simultaneous EWMA control charts (based on the sample mean and the sample variance $S^2$) monitoring normal mean and variance.

Usage

xsewma.crit(lx, ls, L0, df, mu0=0, sigma0=1, cu=NULL, hsx=0, hss=1, s2.on=TRUE, sided="upper", mode="fixed", Nx=20, Ns=40, qm=30)

Arguments

lx
smoothing parameter lambda of the two-sided mean EWMA chart.
ls
smoothing parameter lambda of the variance EWMA chart.
L0
in-control ARL.
mu0
in-control mean.
sigma0
in-control standard deviation.
cu
for two-sided (sided="two") and fixed upper control limit (mode="fixed") a value larger than sigma0 has to been given, for all other cases cu is ignored.
hsx
so-called headstart (give fast initial response) of the mean chart -- do not confuse with the true FIR feature considered in xewma.arl; will be updated.
hss
headstart (give fast initial response) of the variance chart.
df
actual degrees of freedom, corresponds to batch size.
s2.on
distinguish between $S^2$ and $S$ chart.
sided
distinguish 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 ref
mode
only deployed for sided="two" -- with "fixed" an upper control limit (see cu) is set and only the lower is determined to obtain the in-control ARL L0, while with "unbiased" a ce
Nx
dimension of the approximating matrix of the mean chart.
Ns
dimension of the approximating matrix of the variance chart.
qm
number of quadrature nodes used for the collocation integrals.

Value

  • Returns the critical value of the two-sided mean EWMA chart and the lower and upper controls limit cl and cu of the variance EWMA chart.

Details

xsewma.crit determines the critical values (similar to alarm limits) for given in-control ARL L0 by applying secant rule and using xsewma.arl(). In case of sided="two" and mode="unbiased" a two-dimensional secant rule is applied that also ensures that the maximum of the ARL function for given standard deviation is attained at sigma0. See Knoth (2007) for details and application.

References

S. Knoth (2007), Accurate ARL calculation for EWMA control charts monitoring simultaneously normal mean and variance, Sequential Analysis 26, 251-264.

See Also

xsewma.arl for calculation of ARL of simultaneous EWMA charts.

Examples

Run this code
## Knoth (2007)
## results in Table 2

# batch size n=5, df=n-1
df  <- 4
# lambda of mean chart
lx  <- .134
# lambda of variance chart
ls  <- .1
# in-control ARL 
L0 <- 252.3
# matrix dimensions for mean and variance part
Nx  <- 25
Ns  <- 25
# mode of variance chart
SIDED <- "upper"

crit <- xsewma.crit(lx, ls, L0, df, sided=SIDED, Nx=Nx, Ns=Ns)
crit

## output as used in Knoth (2007)
crit["cx"]/sqrt(df+1)*sqrt(lx/(2-lx))
crit["cu"] - 1

Run the code above in your browser using DataLab