Saving Control Limits

[See SHWUCHR in the SAS/QC Sample Library]You can save the control limits for a 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 15.88 in a data set named 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 15.89.

Figure 15.89 The Data Set Fablim Containing Control Limit Information
Control Limits Data Set FABLIM

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _LCLU_ _U_ _UCLU_
Defects Roll ESTIMATE 30 .002550178 3 .001671271 0.30333 0.60500

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 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:

proc shewhart data=Fabric;
   uchart Defects*Roll / subgroupn = 30
                         outtable  = Fabtab
                         nochart;
run;

The data set Fabtab is listed in Figure 15.90.

Figure 15.90 The Data Set Fabtab
Number of Defects Per Square Meter and Control Limits

_VAR_ Roll _SIGMAS_ _LIMITN_ _SUBN_ _LCLU_ _SUBU_ _U_ _UCLU_ _EXLIM_
Defects 1 3 30 30 .001671271 0.40000 0.30333 0.60500  
Defects 2 3 30 30 .001671271 0.36667 0.30333 0.60500  
Defects 3 3 30 30 .001671271 0.30000 0.30333 0.60500  
Defects 4 3 30 30 .001671271 0.50000 0.30333 0.60500  
Defects 5 3 30 30 .001671271 0.23333 0.30333 0.60500  
Defects 6 3 30 30 .001671271 0.20000 0.30333 0.60500  
Defects 7 3 30 30 .001671271 0.16667 0.30333 0.60500  
Defects 8 3 30 30 .001671271 0.33333 0.30333 0.60500  
Defects 9 3 30 30 .001671271 0.26667 0.30333 0.60500  
Defects 10 3 30 30 .001671271 0.26667 0.30333 0.60500  
Defects 11 3 30 30 .001671271 0.46667 0.30333 0.60500  
Defects 12 3 30 30 .001671271 0.16667 0.30333 0.60500  
Defects 13 3 30 30 .001671271 0.30000 0.30333 0.60500  
Defects 14 3 30 30 .001671271 0.43333 0.30333 0.60500  
Defects 15 3 30 30 .001671271 0.23333 0.30333 0.60500  
Defects 16 3 30 30 .001671271 0.16667 0.30333 0.60500  
Defects 17 3 30 30 .001671271 0.26667 0.30333 0.60500  
Defects 18 3 30 30 .001671271 0.36667 0.30333 0.60500  
Defects 19 3 30 30 .001671271 0.23333 0.30333 0.60500  
Defects 20 3 30 30 .001671271 0.40000 0.30333 0.60500  

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 subgroup-variable, 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 chart (not shown here) identical to the chart in Figure 15.88:

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 Specialized Control Charts: SHEWHART Procedure). For more information, see TABLE= Data Set.