Library: | spc |
See also: | spccusum2c spccusum1arl spccusumCarl spccusum2arl spccusum1ad |
Quantlet: | spccusum2ad | |
Description: | Computes the Average Delays of a two-sided CUSUM chart for a given critical value and for various expected values mu. The data are normally distributed with variance 1. |
Usage: | ad = spccusum2ad (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 Definiton scalar, critical value | scalar, dimension of the approximating two-dimensional Markov chain | |
Output: | ||
ad | n x 1 vector of scalars containing the average delays of a two-sided CUSUM chart |
!! On the contrary to spccusum2arl this quantlet is based on a two-dimensional Markov chain, i. e. values of r larger than 30 lead to a large computational amount !!
; ADs of a two-sided CUSUM chart for different expected ; values mu, with reference value k = 0.5 and matrix dimension ; 50 and 20(of the approximating two-dimensional Markov chain): library("spc") mu =(0:4)/4 c = spccusum2c(100,0.5,50) arl = spccusum2ad(mu,0.5,c,20) mu~arl
Contents of _tmp [1,] 0 96.207 [2,] 0.25 50.377 [3,] 0.5 20.427 [4,] 0.75 10.617 [5,] 1 6.7738