Chapter Contents |
Previous |
Next |
CCHART Statement |
See SHWCEX3 in the SAS/QC Sample Library |
In applications where the number of inspection units per subgroup is not equal to one, a u chart is typically used to analyze the number of nonconformities per unit (see Chapter 41, "UCHART Statement"). However, as shown in this example, you can use the CCHART statement to create a c chart for this type of data.
Figure 33.11 illustrates a situation in which varying numbers
of trucks are painted each day.
Trucks painted on the same day are regarded as subgroups,
and each truck is regarded as an inspection unit.
The following statements create a SAS data set named TRUCKS4,
which contains paint defects for trucks painted on
26 days:
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 ;
The variable DEFECTS provides the defect count (ci) for the i th day, and the variable NTRUCKS provides the number of inspection units (ni). The following statements create a c chart for this data:
title 'c Chart for Paint Defects on New Trucks'; symbol v=dot c=red; proc shewhart data=trucks4; cchart defects*day / subgroupn = ntrucks nolegend cframe = steel cinfill = ligr climits = black cconnect = red; run;
The SUBGROUPN= option specifies the subgroup sample size variable NTRUCKS (in general, the values of this variable need not be integers). Alternatively, you can specify a fixed value with the SUBGROUPN= option. When this option is not specified, it is assumed that ni=1.
The chart is shown in Output 33.3.1. Note that the central line and the control limits vary with the number of inspection units.
Output 33.3.1: c Chart for Varying Number of Units
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.