Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
CCHART Statement

Saving Control Limits

See SHWCCHR1 in the SAS/QC Sample Library

You can save the control limits for a c chart in a SAS data set; this enables you to apply the control limits to future data (see "Reading Preestablished Control Limits" ) or subsequently modify the limits with a DATA step program.

The following statements read the data set TRUCKS introduced in "Creating c Charts from Defect Count Data" and saves the control limit information displayed in Figure 33.2 in a data set named DEFLIM:

   proc shewhart data=trucks;
      cchart defects*truckid / outlimits=deflim
                               nochart;
   run;

The OUTLIMITS= option names the data set containing the control limits, and the NOCHART option suppresses the display of the chart. Options such as OUTLIMITS= and NOCHART are specified after the slash (/) in the CCHART statement. A complete list of options is presented in the "Syntax" section. The data set DEFLIM is listed in Figure 33.3.

 
Control Limits Data Set DEFLIM

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _U_ _LCLC_ _C_ _UCLC_
defects truckid ESTIMATE 1 .002902622 3 7.8 0 7.8 16.1785
Figure 33.3: The Data Set DEFLIM Containing Control Limit Information

The data set DEFLIM contains one observation with the limits for the process DEFECTS. The variables _LCLC_, and _UCLC_ contain the lower and upper control limits. The variable _C_ contains the central line, and the variable _U_ contains the average number of nonconformities per inspection unit. Since all the subgroups contain a single inspection unit, the values of _C_ and _U_ are the same. The value of _LIMITN_ is the nominal sample size associated with the control limits, and the value of _SIGMAS_ is the multiple of \sigma associated with the control limits. The variables _VAR_ and _SUBGRP_ are bookkeeping variables that save the process and subgroup-variable. The variable _TYPE_ is a bookkeeping variable that indicates whether the value of _U_ is an estimate or standard value. For more information, see "OUTLIMITS= Data Set" .

Alternatively, you can use the OUTTABLE= option to create an output data set that saves both the control limits and the subgroup statistics, as illustrated by the following statements:

   title 'Number of Nonconformities and Control Limit Information';
   proc shewhart data=trucks;
      cchart defects*truckid / outtable=trucktab
                               nochart;
   run;


The OUTTABLE= data set TRUCKTAB is listed in Figure 33.4.

 
Number of Nonconformities and Control Limit Information

_VAR_ truckid _SIGMAS_ _LIMITN_ _SUBN_ _LCLC_ _SUBC_ _C_ _UCLC_ _EXLIM_
defects C1 3 1 1 0 5 7.8 16.1785  
defects C2 3 1 1 0 4 7.8 16.1785  
defects C3 3 1 1 0 4 7.8 16.1785  
defects C4 3 1 1 0 8 7.8 16.1785  
defects C5 3 1 1 0 7 7.8 16.1785  
defects C6 3 1 1 0 12 7.8 16.1785  
defects C7 3 1 1 0 3 7.8 16.1785  
defects C8 3 1 1 0 11 7.8 16.1785  
defects E4 3 1 1 0 8 7.8 16.1785  
defects E9 3 1 1 0 4 7.8 16.1785  
defects E7 3 1 1 0 9 7.8 16.1785  
defects E6 3 1 1 0 13 7.8 16.1785  
defects A3 3 1 1 0 5 7.8 16.1785  
defects A4 3 1 1 0 4 7.8 16.1785  
defects A7 3 1 1 0 9 7.8 16.1785  
defects Q1 3 1 1 0 15 7.8 16.1785  
defects Q2 3 1 1 0 8 7.8 16.1785  
defects Q3 3 1 1 0 9 7.8 16.1785  
defects Q9 3 1 1 0 10 7.8 16.1785  
defects Q4 3 1 1 0 8 7.8 16.1785  
Figure 33.4: The Data Set TRUCKTAB

This data set contains one observation for each subgroup sample. The variables _SUBC_ and _SUBN_ contain the number of nonconformites per subgroup and the number of inspection units per subgroup. The variables _LCLC_ and _UCLC_ contain the lower and upper control limits, and the variable _C_ contains the central line. The variables _VAR_ and TRUCKID contain the process name and values of the subgroup-variable, respectively. For more information, see "OUTTABLE= Data Set" .

An OUTTABLE= data set can be read later as a TABLE= data set in the SHEWHART procedure. For example, the following statements read TRUCKTAB and display a c chart (not shown here) identical to the chart in Figure 33.2:

   title 'c Chart for Paint Defects in New Trucks';
   proc shewhart table=trucktab;
      cchart defects*truckid='*';
   label _SUBC_ = 'Number of Paint Defects';
   run;

Because the SHEWHART procedure simply displays the information in a TABLE= data set, you can use TABLE= data sets to create specialized control charts (see Chapter 49, "Specialized Control Charts"). For more information, see "TABLE= Data Set".

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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