Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
CCHART Statement

Saving Nonconformities per Unit

See SHWCCHR1 in the SAS/QC Sample Library

A department store receives boxes of shirts containing 10, 25, or 50 shirts. Each box is inspected, and the total number of defects per box is recorded. The following statements create a SAS data set named SHIRTS2, which contains the total defects per box for 20 boxes:

   data shirts2;
      input box flaws nshirts @@;
      datalines;
    1  3  10    2  8  10    3 15  25    4 20  25
    5  9  25    6  1  10    7  1  10    8 21  50
    9  3  10   10  7  10   11  1  10   12 21  25
   13  9  25   14  3  25   15 12  50   16 18  50
   17  7  10   18  4  10   19  8  10   20  4  10
   ;

A listing of SHIRTS2 is shown in Figure 33.8.

 
Number of Shirt Flaws per Box

box flaws nshirts
1 3 10
2 8 10
3 15 25
4 20 25
5 9 25
6 1 10
7 1 10
8 21 50
9 3 10
10 7 10
11 1 10
12 21 25
13 9 25
14 3 25
15 12 50
16 18 50
17 7 10
18 4 10
19 8 10
20 4 10
Figure 33.8: The Data Set SHIRTS2

The variable BOX contains the box number, the variable FLAWS contains the number of flaws in each box, and the variable NSHIRTS contains the number of shirts in each box. To evaluate the quality of the shirts, you should report the average number of defects per shirt. The following statements create a data set containing the number of flaws per shirt and the number of shirts per box:

   proc shewhart data=shirts2;
      cchart flaws*box / subgroupn =nshirts
                         outhistory=shrthist
                         nochart;
   run;

The SUBGROUPN= option names the variable in the DATA= data set whose values specify the number of inspection units per subgroup. The OUTHISTORY= option names an output data set containing the number of nonconformities per inspection unit and the number of inspection units per subgroup. A listing of SHRTHIST is shown in Figure 33.9.

 
Average Defects Per Shirt

box flawsU flawsN
1 0.30 10
2 0.80 10
3 0.60 25
4 0.80 25
5 0.36 25
6 0.10 10
7 0.10 10
8 0.42 50
9 0.30 10
10 0.70 10
11 0.10 10
12 0.84 25
13 0.36 25
14 0.12 25
15 0.24 50
16 0.36 50
17 0.70 10
18 0.40 10
19 0.80 10
20 0.40 10
Figure 33.9: The Data Set SHRTHIST

There are three variables in the data set SHRTHIST.

Note that the variables containing the numbers of nonconformities per inspection unit and subgroup sample sizes are named by adding the suffix characters U and N to the process DEFECTS specified in the CCHART statement. In other words, the variable naming convention for OUTHISTORY= data sets is the same as that for HISTORY= data sets.

For more information, see "OUTHISTORY= Data Set" .

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.