DM 'LOG; CLEAR; OUT; CLEAR;'; * ODS PRINTER PDF file='C:\COURSES\ST528\SAS\PCHART2.PDF'; ODS LISTING; OPTIONS NODATE NONUMBER LS=76 PS=54; ******************************************************; *** P-chart (with specified p) ***; *** The response is the number of failing circuits ***; *** from 20 batches of size 500 ***; ******************************************************; DATA circuits; INPUT batch fail @@; LINES; 1 5 2 6 3 11 4 6 5 4 6 9 7 17 8 10 9 12 10 9 11 8 12 7 13 7 14 15 15 8 16 18 17 12 18 16 19 4 20 7 21 17 22 12 23 8 24 7 25 15 26 6 27 8 28 12 29 7 30 9 ; /* You can Specify the Standard Average Proportion with the P0= Option (as Shown in the Following Statments) */ TITLE1 'p Chart for Failing Circuits'; TITLE2 'Using Data in CIRCUITS and Standard Value P0=0.02'; SYMBOL1 V=star C=black; PROC SHEWHART DATA=circuits ; PCHART fail*batch='1' / TESTS = 1 to 8 SUBGROUPN = 500 P0 = 0.02 PSYMBOL = p0 ZONELABELS TABLETESTS TABLELEGEND NEEDLES; LABEL batch = 'Batch Number' fail = 'Fraction Failing'; RUN;