Library: | spc |
See also: | spcewma2c spcewma2arl spcewma2ad spcewma2pmf spcewma1 |
Quantlet: | spcewma2 | |
Description: | graphical representation of a two-sided EWMA chart for given data, critical value and smoothing parameter lambda |
Usage: | spcewma2(lambda, c, observed) | |
Input: | ||
lambda | scalar representing the smoothing parameter | |
c | scalar representing the critical value. It is computed in order to provide an in-control ARL. | |
observed | n x 1 vector of user-defined data |
; Computation of a two-sided EWMA chart for 100 pseudorandom ; variables with normal distribution, where the first 80 ; observations have mean = 0 and the next 20 have mean = 1. ; The chart parameters are: lambda = 0.1 and in-control ARL = 300: library("spc") mean = #(matrix(80) .* 0, matrix(20) .* 1) randomize(31) observed = normal(100) + mean c = spcewma2c(300,.1,50) spcewma2( .1, c, observed)
A display showing the two-sided EWMA chart. An alarm is signaled at t = 94.