Library: | spc |
See also: | spccusum1c spccusum1arl spccusum1 |
Quantlet: | spccusum1ad | |
Description: | Computes the Average Delays of a one-sided CUSUM chart for a given critical value and for various expected values mu. The data is normally distributed with variance 1. |
Usage: | ad = spccusum1ad (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 one-dimensional Markov chain. Good accuracy is already obtained for smaller values than in the ARL scheme. | |
Output: | ||
ad | n x 1 vector of scalars containing the average delays of a one-sided CUSUM chart |
; ADs of a one-sided CUSUM chart for different expected ; values mu, reference value k = 0.5 and matrix dimension 50(of ; the approximating one-dimensional Markov chain); library("spc") ; load quantlets of library spc mu =(0:4)/4 ; expected value c = spccusum1c(100,0.5,50) ; critical value ad = spccusum1ad(mu,0.5,c,50) ; average delay mu~ad
Contents of _tmp [1,] 0 97.577 [2,] 0.25 33.951 [3,] 0.5 15.141 [4,] 0.75 8.4566 [5,] 1 5.5793