| Library: | spc |
| See also: | spccusum2c spccusum1arl spccusumCarl spccusum2ad |
| Quantlet: | spccusum2arl | |
| Description: | Computes the Average Run Lengths of a two-sided CUSUM chart for a given critical value and for various expected values mu. The data is normally distributed with variance 1. |
| Usage: | arl = spccusum2arl (mu, k, c, r) | |
| Input: | ||
| mu | 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 approximating the two-dimensional Markov chain | |
| Output: | ||
| arl | n x 1 vector of scalars representing the Average Run Lengths of a two-sided CUSUM chart | |
; ARLs of a two-sided CUSUM chart for different expected
; values mu, with reference value k = 0.5 and matrix dimension 50
;(of the approximating two-dimensional Markov chain)
library("spc")
mu =(0:4)/4
c = spccusum2c(100,0.5,50)
arl = spccusum2arl(mu,0.5,c,50)
mu~arl
Contents of _tmp [1,] 0 99.999 [2,] 0.25 52.669 [3,] 0.5 21.701 [4,] 0.75 11.465 [5,] 1 7.3966