Chapter Contents 
Previous 
Next 
CCHART Statement 
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.

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 associated with the control limits. The variables _VAR_ and _SUBGRP_ are bookkeeping variables that save the process and subgroupvariable. 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.
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 subgroupvariable, 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;
Chapter Contents 
Previous 
Next 
Top 
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.