Resources

Average Run Length for Two-Sided Cusum

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: CUSARL                                              */
 /*   TITLE: Average Run Length for Two-Sided Cusum              */
 /* PRODUCT: QC                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: Cusum Charts, Average Run Lengths,                  */
 /*   PROCS: CUSUM                                               */
 /*    DATA:                                                     */
 /*                                                              */
 /*     REF: SAS/QC Software:  Examples                          */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

options ps=60 ls=80 nodate;

data arltable;
   do h=4.0 to 5.0 by 0.1;
      arl=cusumarl('twosided',0,h,0.5);
      output;
      end;
run;

title 'Average Run Lengths for Delta=0 and k=0.5';
proc print data=arltable;
   id h;
run;

title;