Computing Average Run Lengths for EWMA Chart
/*******************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: MACEW6 */
/* TITLE: Computing Average Run Lengths for EWMA Chart */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: Moving Average Charts, Average Run Lengths, */
/* PROCS: MACONTROL */
/* DATA: */
/* */
/* SUPPORT: saswgr */
/* REF: PROC MACONTROL, EWMACHART Statement, Example 5 */
/* */
/*******************************************************************/
data ARLs;
do shift=.5 to 2 by .5;
do Weight=.25 to 1 by .25;
arl=ewmaarl(shift,Weight,3.0);
output;
end;
end;
run;
title 'Average Run Lengths for Various Shifts and Weights';
proc print data=ARLs noobs;
by shift;
run;
data ARLinfo;
do shift=0 to 2 by .25;
arl = ewmaarl(shift,0.3,3.0);
output;
end;
run;
title 'Average Run Lengths for EWMA Scheme (k=3 and r=0.3)';
proc print data=ARLinfo noobs;
run;