Chapter Contents 
Previous 
Next 
UCHART Statement 
See SHWUCHR in the SAS/QC Sample Library 
You can save the control limits for a u chart in a SAS data set; this enables you to apply the control limits to future data (see "Reading Preestablished Control Limits" ) or modify the limits with a DATA step program.
The following statements read defect counts from the
data set FABRIC (see
"Creating u Charts from Defect Count Data" )
and save the control limits
displayed in Figure 41.2 in a data set named FABLIM:
title 'Control Limits Data Set FABLIM'; proc shewhart data=fabric; uchart defects*roll / subgroupn=30 outlimits=fablim nochart; run;
The SUBGROUPN= option specifies the number of inspection units in each subgroup sample. The OUTLIMITS= option names the data set containing the control limits, and the NOCHART option suppresses the display of the chart. The data set FABLIM is listed in Figure 41.3.

The data set FABLIM contains one observation with the limits for process DEFECTS. The variables _LCLU_ and _UCLU_ contain the lower and upper control limits, and the variable _U_ contains the central line. 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 Defects Per Square Meter and Control Limits'; proc shewhart data=fabric; uchart defects*roll / subgroupn=30 outtable=fabtab nochart; run;
This data set contains one observation for each subgroup sample. The variables _SUBU_ and _SUBN_ contain the number of nonconformities per unit in each subgroup and the number of inspection units per subgroup. The variables _LCLU_ and _UCLU_ contain the lower and upper control limits, and the variable _U_ contains the central line. The variables _VAR_ and ROLL 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 by the SHEWHART procedure. For example, the following statements read FABTAB and display a u chart (not shown here) identical to the chart in Figure 41.2:
title 'u Chart for Fabric Defects'; proc shewhart table=fabtab; uchart defects*roll / subgroupn=30; 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 
Previous 
Next 
Top 
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.