Learn R Programming

spc (version 0.4.2)

xewma.sf: Compute the survival function of EWMA run length

Description

Computation of the survival function of the Run Length (RL) for EWMA control charts monitoring normal mean.

Usage

xewma.sf(l, c, mu, n, zr=0, hs=0, sided="one", limits="fix", q=1, r=40)

Arguments

l
smoothing parameter lambda of the EWMA control chart.
c
critical value (similar to alarm limit) of the EWMA control chart.
mu
true mean.
n
calculate sf up to value n.
zr
reflection border for the one-sided chart.
hs
so-called headstart (enables fast initial response).
sided
distinguishes between one- and two-sided EWMA control chart by choosing "one" and "two", respectively.
limits
distinguishes between different control limits behavior.
q
change point position. For $q=1$ and $\mu=\mu_0$ and $\mu=\mu_1$, the usual zero-state situation for the in-control and out-of-control case, respectively, are calculated. Note that mu0=0 is implicitely fixed.
r
number of quadrature nodes, dimension of the resulting linear equation system is equal to r+1 (one-sided) or r (two-sided).

Value

  • Returns a vector which resembles the survival function up to a certain point.

Details

The survival function P(L>n) and derived from it also the cdf P(L<=n) 1="" and="" the="" pmf="" p(l="n)" illustrate="" distribution="" of="" ewma="" run="" length.="" for="" large="" n="" geometric="" tail="" could="" be="" exploited.="" that="" is,="" with="" reasonable="" complete="" is="" characterized.="" algorithm="" based="" on="" waldmann's="" survival="" function="" iteration="" procedure.="" varying="" limits="" change="" points="" after="" from="" knoth="" (2004)="" applied.="" note="" one-sided="" charts="" (sided="one"), only "vacl" and "stat" are deployed, while for two-sided ones (sided="two") also "fir", "both" (combination of "fir" and "vacl"), and "Steiner" are implemented. For details see Knoth (2004).

References

F. F. Gan (1993), An optimal design of EWMA control charts based on the median run length, J. Stat. Comput. Simulation 45, 169-184.

S. Knoth (2003), EWMA schemes with non-homogeneous transition kernels, Sequential Analysis 22, 241-255.

S. Knoth (2004), Fast initial response features for EWMA Control Charts, Statistical Papers 46, 47-64.

K.-H. Waldmann (1986), Bounds for the distribution of the run length of geometric moving average charts, Appl. Statist. 35, 151-158.

See Also

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

Examples

Run this code
## Gan (1993), two-sided EWMA with fixed control limits
## some values of his Table 1 -- any median RL should be 500

G.lambda <- c(.05, .1, .15, .2, .25)
G.h <- c(.441, .675, .863, 1.027, 1.177)/sqrt(G.lambda/(2-G.lambda))

for ( i in 1:length(G.lambda) ) {
  SF <- xewma.sf(G.lambda[i], G.h[i], 0, 1000)
  if (i==1) plot(1:length(SF), SF, type="l", xlab="n", ylab="P(L>n)")
  else lines(1:length(SF), SF, col=i)
  }

Run the code above in your browser using DataLab