Library: | spc |
See also: | spcewma2c spcewma2arl spcewma1ad |
Quantlet: | spcewma2ad | |
Description: | Computes the Average Delays of a two-sided EWMA chart for a given critical value and for various expected values mu. The data is normally distributed with variance 1. |
Usage: | ad = spcewma2ad (mu, lambda, c, r) | |
Input: | ||
mu | n x 1 vector representing the expected values of the user-defined random variable | |
lambda | scalar representing the smoothing parameter | |
c | scalar, critical value | |
r | scalar, matrix dimension of the approximating two-dimensional Markov chain | |
Output: | ||
ad | n x 1 vector containing the average delays of a two-sided EWMA chart |
; ADs of a two-sided EWMA chart for different expectes values ; mu, smoothing parameters lambda = 0.5 and matrix dimension 50 ;(of the approximating two-dimensional Markov chain): library("spc") mu =(0:4)/4 c = spcewma2c(100,0.5,50) ad = spcewma2ad(mu,0.5,c,50) mu~ad
Contents of _tmp [1,] 0 99.155 [2,] 0.25 62.574 [3,] 0.5 28.588 [4,] 0.75 14.467 [5,] 1 8.4711