c Chart for Varying Number of Inspection Units
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: SHWCEX3 */
/* TITLE: c Chart for Varying Number of Inspection Units */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: Shewhart Charts, c Charts, */
/* PROCS: SHEWHART */
/* DATA: */
/* */
/* REF: SAS/QC Software: Usage and Reference, Version 6, */
/* First Edition, Volume 1 and Volume 2 */
/* */
/****************************************************************/
data Trucks4;
input Day Defects Ntrucks @@;
label Day='Day'
Defects='Number of Paint Defects';
datalines;
1 5 1 2 9 3
3 5 2 4 9 2
5 24 4 6 10 2
7 15 3 8 17 3
9 16 3 10 13 2
11 28 4 12 18 5
13 8 2 14 7 2
15 5 1 16 17 3
17 2 1 18 17 3
19 15 4 20 19 5
21 6 3 22 23 5
23 27 4 24 6 2
25 12 2 26 12 3
;
ods graphics on;
title 'c Chart for Varying Number of Units Per Subgroup';
proc shewhart data=Trucks4;
cchart Defects*Day / subgroupn = Ntrucks
odstitle = title
nolegend;
run;