Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: spc
See also: spcewma1c spcewma1arl spcewma1ad spcewma1pmf spcewma2

Quantlet: spcewma1
Description: graphical representation of a one-sided EWMA chart for given data, critical value and smoothing parameter lambda

Reference(s):

Usage: spcewma1(lambda, c, zreflect, observed)
Input:
lambda scalar, containing the smoothing parameter
c scalar, representing the critical value. It is computed in order to provide an in-control ARL.
zreflect scalar, representing a pre-specified border. It is usually less than zero.
observed n x 1 vector of user-defined data

Note:

Example:
; One-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, in-control ARL = 300 and
; zreflect = -4:
library("spc")
mean = #(matrix(80) .* 0, matrix(20) .* 1)
randomize(31)
observed = normal(100) + mean
c = spcewma1c(300,.1,-4,50)
spcewma1( .1, c, -4, observed)

Result:
A display showing the one-sided EWMA chart. An alarm is
signaled at t = 93.



Author: S. Knoth, 20011015 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006