XRCHART Statement: SHEWHART Procedure

Saving Control Limits

Note: See Mean and Range (X-Bar and R) Charts in the SAS/QC Sample Library.

You can save the control limits for $\bar{X}$ and R charts 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 measurements from the data set Wafers (see Creating Charts for Means and Ranges from Raw Data) and save the control limits displayed in Figure 18.106 in Waferlim:

proc shewhart data=Wafers;
   xrchart Diameter*Batch / outlimits = Waferlim
                            nochart;
run;

The OUTLIMITS= option names the data set containing the control limits, and the NOCHART option suppresses the display of the charts. The data set Waferlim is listed in Figure 18.110.

Figure 18.110: The Data Set Waferlim Containing Control Limit Information

Control Limits for Wafer Diameters

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _LCLX_ _MEAN_ _UCLX_ _LCLR_ _R_ _UCLR_ _STDDEV_
Diameter Batch ESTIMATE 5 .002699796 3 34.9823 34.9950 35.0077 0 0.022 0.046519 .009458586



The data set Waferlim contains one observation with the limits for process Diameter. The variables _LCLX_ and _UCLX_ contain the lower and upper control limits for the $\bar{X}$ chart. The variables _LCLR_ and _UCLR_ contain the lower and upper control limits for the R chart. The variable _MEAN_ contains the central line for the $\bar{X}$ chart, and the variable _R_ contains the central line for the R chart. The value of _MEAN_ is an estimate of the process mean, and the value of _STDDEV_ is an estimate of the process standard deviation $\sigma $. 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 names. The variable _TYPE_ is a bookkeeping variable that indicates whether the values of _MEAN_ and _STDDEV_ are estimates or standard values.

You can save process capability indices in an OUTLIMITS= data set if you provide specification limits with the LSL= and USL= options. This is illustrated by the following statements:

proc shewhart data=Wafers;
   xrchart Diameter*Batch / outlimits = Waferlim2
                            usl       = 35.03
                            lsl       = 34.97
                            nochart;
run;

The data set Waferlim2 is listed in Figure 18.111.

Figure 18.111: The Data Set Waferlim2 Containing Process Capability Indices

Control Limits and Capability Indices

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _LCLX_ _MEAN_ _UCLX_ _LCLR_ _R_ _UCLR_ _STDDEV_ _LSL_ _USL_ _CP_ _CPL_ _CPU_ _CPK_
Diameter Batch ESTIMATE 5 .002699796 3 34.9823 34.9950 35.0077 0 0.022 0.046519 .009458586 34.97 35.03 1.05724 0.87962 1.23486 0.87962



The variables _CP_, _CPL_, _CPU_, and _CPK_ contain the process capability indices. It is reasonable to compute capability indices, because Figure 18.106 indicates that the wafer process is in statistical control. However, it is recommended that you also check for normality of the data. You can use the CAPABILITY procedure for this purpose.

For more information, see OUTLIMITS= Data Set.

You can create an output data set containing both control limits and summary statistics with the OUTTABLE= option, as illustrated by the following statements:

proc shewhart data=Wafers;
   xrchart Diameter*Batch / outtable=Wafertab
                            nochart;
run;

The data set Wafertab is listed in Figure 18.112.

Figure 18.112: The Data Set Wafertab

Summary Statistics and Control Limit Information

_VAR_ Batch _SIGMAS_ _LIMITN_ _SUBN_ _LCLX_ _SUBX_ _MEAN_ _UCLX_ _STDDEV_ _EXLIM_ _LCLR_ _SUBR_ _R_ _UCLR_ _EXLIMR_
Diameter 1 3 5 5 34.9823 34.992 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 2 3 5 5 34.9823 34.994 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 3 3 5 5 34.9823 34.998 34.9950 35.0077 .009458586   0 0.01 0.022 0.046519  
Diameter 4 3 5 5 34.9823 34.998 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 5 3 5 5 34.9823 34.992 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 6 3 5 5 34.9823 34.996 34.9950 35.0077 .009458586   0 0.01 0.022 0.046519  
Diameter 7 3 5 5 34.9823 34.996 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 8 3 5 5 34.9823 34.992 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 9 3 5 5 34.9823 34.992 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 10 3 5 5 34.9823 35.000 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 11 3 5 5 34.9823 34.996 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 12 3 5 5 34.9823 34.994 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 13 3 5 5 34.9823 34.992 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 14 3 5 5 34.9823 34.998 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 15 3 5 5 34.9823 34.988 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 16 3 5 5 34.9823 35.000 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 17 3 5 5 34.9823 34.984 34.9950 35.0077 .009458586   0 0.01 0.022 0.046519  
Diameter 18 3 5 5 34.9823 35.002 34.9950 35.0077 .009458586   0 0.04 0.022 0.046519  
Diameter 19 3 5 5 34.9823 34.988 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 20 3 5 5 34.9823 34.994 34.9950 35.0077 .009458586   0 0.01 0.022 0.046519  
Diameter 21 3 5 5 34.9823 34.992 34.9950 35.0077 .009458586   0 0.02 0.022 0.046519  
Diameter 22 3 5 5 34.9823 35.002 34.9950 35.0077 .009458586   0 0.01 0.022 0.046519  
Diameter 23 3 5 5 34.9823 35.004 34.9950 35.0077 .009458586   0 0.04 0.022 0.046519  
Diameter 24 3 5 5 34.9823 34.996 34.9950 35.0077 .009458586   0 0.03 0.022 0.046519  
Diameter 25 3 5 5 34.9823 34.994 34.9950 35.0077 .009458586   0 0.01 0.022 0.046519  



This data set contains one observation for each subgroup sample. The variables _SUBX_, _SUBR_, and _SUBN_ contain the subgroup means, subgroup ranges, and subgroup sample sizes. The variables _LCLX_ and _UCLX_ contain the lower and upper control limits for the $\bar{X}$ chart. The variables _LCLR_ and _UCLR_ contain the lower and upper control limits for the R chart. The variable _MEAN_ contains the central line of the $\bar{X}$ chart, and the variable _R_ contains the central line of the R chart. The variables _VAR_ and Batch 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. For example, the following statements read Wafertab and display $\bar{X}$ and R charts identical to those in Figure 18.106:

title 'Mean and Range Charts for Diameters';
proc shewhart table=Wafertab;
   xrchart Diameter*Batch;
run;

Because the SHEWHART procedure simply displays the information read from 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.