Resources

p Charts-Tests for Special Causes

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWPEX1                                             */
/*   TITLE: p Charts-Tests for Special Causes                   */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, p 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 off;
title1'p Chart for the Proportion of Failing Circuits';
title2 'Tests = 1 to 4';
proc shewhart data=Circuit3;
   pchart Fail*Batch / subgroupn = 500
                       tests     = 1 to 4
                       zones
                       zonelabels
                       ltests    = 20
                       table
                       tabletest
                       tablelegend;
run;