Library: | spc |
See also: | spccusum1c spccusum2arl spccusumCarl |
Quantlet: | spccusum1arl | |
Description: | Computes the Average Run Lengths of a one-sided CUSUM chart for a given critical value and for various expected values mu. The data are normally distributed with variance 1. |
Usage: | arl = spccusum1arl (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, the critical value | |
r | scalar, matrix dimension of the approximating one-dimensional Markov chain. The larger r the better is the approximation. | |
Output: | ||
arl | n x 1 vector representing the Average Run Lengths of a one-sided CUSUM chart |
; ARLs of a one-sided CUSUM chart for different expected ; values mu, reference value k = 0.5 and matrix dimension ; of 50(of the approximating one-dimensional Markov chain): library("spc") ; load quantlets of spc library mu =(0:4)/4 ; expected values c = spccusum1c(100,0.5,50) ; compute the critical value arl = spccusum1arl(mu,0.5,c,50) ; average run length mu~arl
Contents of _tmp [1,] 0 100 [2,] 0.25 35.424 [3,] 0.5 16.121 [4,] 0.75 9.1572 [5,] 1 6.1087