Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
CCHART Statement

Creating c Charts from Defect Count Data

See SHWCCHR1 in the SAS/QC Sample Library

A c chart is used to monitor the number of paint defects on new trucks. Twenty trucks of the same model are inspected, and the number of paint defects per truck is recorded. The following statements create a SAS data set named TRUCKS, which contains the defect counts:

   data trucks;
      input truckid $ defects @@;
      label truckid='Truck Identification Number'
            defects='Number of Paint Defects';
      datalines;
   C1   5    C2   4    C3   4    C4   8
   C5   7    C6  12    C7   3    C8  11
   E4   8    E9   4    E7   9    E6  13
   A3   5    A4   4    A7   9    Q1  15
   Q2   8    Q3   9    Q9  10    Q4   8
   ;

A listing of TRUCKS is shown in Figure 33.1.

 
Paint Defects on New Trucks

truckid defects
C1 5
C2 4
C3 4
C4 8
C5 7
C6 12
C7 3
C8 11
E4 8
E9 4
E7 9
E6 13
A3 5
A4 4
A7 9
Q1 15
Q2 8
Q3 9
Q9 10
Q4 8
Figure 33.1: The Data Set TRUCKS

There is a single observation per truck. The variable TRUCKID identifies the subgroup sample and is referred to as the subgroup-variable. The variable DEFECTS contains the number of nonconformities in each subgroup sample and is referred to as the process variable (or process for short).

The following statements create the c chart shown in Figure 33.2:

   title 'c Chart for Paint Defects on New Trucks';
   proc shewhart data=trucks lineprinter;
      cchart defects*truckid='*';
   run;

This example illustrates the basic form of the CCHART statement. After the keyword CCHART, you specify the process to analyze (in this case, DEFECTS) followed by an asterisk and the subgroup-variable (TRUCKID).

Since the LINEPRINTER option is specified in the PROC SHEWHART statement, line printer output is produced. The asterisk (*) specified in single quotes after the subgroup-variable specifies the character used to plot points. Note that this character must follow an equal sign.

 
c Chart for Paint Defects on New Trucks

                                                                       3 Sigma Limits     
                                                                       For n=1:           
           ----------------------------------------------------------                     
       20 +                                                          |                    
          |                                                          |                    
          |                                                          |                    
     N    |                                                          |                    
     u    |                                                          |                    
     m    |==========================================================| UCL = 16.2         
     b    |                                                          |                    
     e 15 +                                             *            |                    
     r    |                                             +            |                    
          |                                            + +           |                    
     o    |                                 *          + +           |                    
     f    |               *                ++          + +           |                    
          |               +                + +        +  +           |                    
     P    |              ++     *         +  +        +   +          |                    
     a 10 +              + +    ++        +  +       +    +     +*   |                    
     i    |             +  +   +  +      *   +       *    +   *+  +  |                    
     n    |             +  +   +  +      +    +      +     +++     + | -                  
     t    |---------*+-+---+---+---*----+-----+-----+------*--------*| C = 7.8            
          |        +  +*    +  +    +   +     +     +                |                    
     D    |        +        + +     +  +      +    +                 |                    
     e    |       +         + +      + +       +   +                 |                    
     f  5 +*+     +         + +      ++        *+ +                  |                    
     e    |  +*++*           ++       *          +*                  |                    
     c    |                  +                                       |                    
     t    |                  *                                       |                    
     s    |                                                          |                    
          |                                                          |                    
          |                                                          |                    
        0 +==========================================================| LCL = 0            
           +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+                     
           C1    C3    C5    C7    E4    E7    A3    A7    Q2    Q9                       
                                                                                          
                          Truck Identification Number                                     
                                                                                          
     Subgroup Sizes:  * n=1                                                               
Figure 33.2: A c Chart of Paint Defects

Each point on the c chart represents the number of nonconformities for a particular subgroup. For instance, the value plotted for the first subgroup is 5 (since there are five paint defects on the first truck). By default, the control limits shown are 3\sigma limits estimated from the data; the formulas are given at "Control Limits" . Since none of the points exceed the 3\sigma limits, the c chart indicates that the painting process is in statistical control.

See "Constructing Charts for Numbers of Nonconformities (c Charts)" for details concerning c charts. For more details on reading raw data, see "DATA= Data Set" .

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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