Library: | spc |
See also: | spccusumCc spccusum2arl spccusum1arl |
Quantlet: | spccusumCarl | |
Description: | Computes the Average Run Lengths of the Crosier-CUSUM chart for a given critical value and for various expected values mu. The data are normally distributed with variance 1. |
Usage: | arl = spccusumCarl (mu, k, c, r) | |
Input: | ||
mu | n x 1 vector containing the expected values of the user-defined random variable | |
k | scalar, reference value. It must be positive and be expressed as a multiple of the standard error. | |
c | scalar, critical value | |
r | scalar, matrix dimension of the approximating two-dimensional Markov chain | |
Output: | ||
arl | n x 1 vector of scalars representing the Average Run Lengths of a Crosier-CUSUM chart |
; ARLs of the Crosier-CUSUM chart for different expected ; values mu, reference value k = 0.5 and matrix dimension 50 ;(of the approximating two-dimensioanl Markov chain): library("spc") mu =(0:4)/4 c = spccusumCc(100,0.5,50) arl = spccusumCarl(mu,0.5,c,50) mu~arl
Contents of _tmp [1,] 0 99.999 [2,] 0.25 50.317 [3,] 0.5 20.37 [4,] 0.75 10.765 [5,] 1 6.9523