np Charts-Tests for Special Causes

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWNP2                                              */
/*   TITLE: np Charts-Tests for Special Causes                  */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts,np Charts,Tests for Special Causes, */
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Circuit3;
   input Batch Fail @@;
   datalines;
 1 12    2 21    3 16    4  9
 5  3    6  4    7  6    8  9
 9 11   10 13   11 12   12  7
13  2   14 14   15  9   16  8
17 14   18 10   19 11   20  9
;


ods graphics on;
title1'np Chart for the Number of Failing Circuits';
title2 'Tests=1 to 4';
proc shewhart data=Circuit3;
   npchart Fail*Batch / subgroupn = 500
                        tests=1 to 4
                        table
                        tabletest
                        tablelegend
                        zones
                        zonelabels
                        odstitle  = title
                        odstitle2 = title2;
run;