Note: See Mean (X-BAR) Chart Examples in the SAS/QC Sample Library.
You can save the control limits for an 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 measurements from the data set Partgaps
(see Creating Charts for Means from Raw Data) and save the control limits displayed in Figure 18.97 in a data set named Gaplim
:
proc shewhart data=Partgaps; xchart Partgap*Sample / outlimits = Gaplim nochart; run;
The OUTLIMITS=
option names the data set containing the control limits, and the NOCHART
option suppresses the display of the chart. The data set Gaplim
is listed in Figure 18.102.
Figure 18.102: The Data Set Gaplim
Containing Control Limit Information
The data set Gaplim
contains one observation with the limits for process Partgap
. The variables _LCLX_
and _UCLX_
contain the lower and upper control limits for the means, and the variable _MEAN_
contains the central line. The value of _MEAN_
is an estimate of the process mean, and the value of _STDDEV_
is an estimate of the process standard deviation . 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 values of _MEAN_
and _STDDEV_
are estimates or standard values.
The variables _LCLR_
, _R_
, and _UCLR_
are not used to create charts, but they are included so the data set Gaplim
can be used to create an R chart; see XRCHART Statement: SHEWHART Procedure. If you specify the STDDEVIATIONS
option in the XCHART statement, the variables _LCLS_
, _S_
, and _UCLS_
are included in the OUTLIMITS= data set. These variables can be used to create an s chart; see XSCHART Statement: SHEWHART Procedure. 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=Partgaps; xchart Partgap*Sample / outtable=Gaptable nochart; run;
The data set Gaptable
is listed in Figure 18.103.
Figure 18.103: The Data Set Gaptable
Summary Statistics and Control Limit Information |
_VAR_ | Sample | _SIGMAS_ | _LIMITN_ | _SUBN_ | _LCLX_ | _SUBX_ | _MEAN_ | _UCLX_ | _STDDEV_ | _EXLIM_ |
---|---|---|---|---|---|---|---|---|---|---|
Partgap | 1 | 3 | 5 | 5 | 242.087 | 270 | 259.667 | 277.246 | 13.1028 | |
Partgap | 2 | 3 | 5 | 5 | 242.087 | 258 | 259.667 | 277.246 | 13.1028 | |
Partgap | 3 | 3 | 5 | 5 | 242.087 | 248 | 259.667 | 277.246 | 13.1028 | |
Partgap | 4 | 3 | 5 | 5 | 242.087 | 260 | 259.667 | 277.246 | 13.1028 | |
Partgap | 5 | 3 | 5 | 5 | 242.087 | 273 | 259.667 | 277.246 | 13.1028 | |
Partgap | 6 | 3 | 5 | 5 | 242.087 | 260 | 259.667 | 277.246 | 13.1028 | |
Partgap | 7 | 3 | 5 | 5 | 242.087 | 259 | 259.667 | 277.246 | 13.1028 | |
Partgap | 8 | 3 | 5 | 5 | 242.087 | 248 | 259.667 | 277.246 | 13.1028 | |
Partgap | 9 | 3 | 5 | 5 | 242.087 | 260 | 259.667 | 277.246 | 13.1028 | |
Partgap | 10 | 3 | 5 | 5 | 242.087 | 255 | 259.667 | 277.246 | 13.1028 | |
Partgap | 11 | 3 | 5 | 5 | 242.087 | 268 | 259.667 | 277.246 | 13.1028 | |
Partgap | 12 | 3 | 5 | 5 | 242.087 | 253 | 259.667 | 277.246 | 13.1028 | |
Partgap | 13 | 3 | 5 | 5 | 242.087 | 273 | 259.667 | 277.246 | 13.1028 | |
Partgap | 14 | 3 | 5 | 5 | 242.087 | 275 | 259.667 | 277.246 | 13.1028 | |
Partgap | 15 | 3 | 5 | 5 | 242.087 | 257 | 259.667 | 277.246 | 13.1028 | |
Partgap | 16 | 3 | 5 | 5 | 242.087 | 269 | 259.667 | 277.246 | 13.1028 | |
Partgap | 17 | 3 | 5 | 5 | 242.087 | 249 | 259.667 | 277.246 | 13.1028 | |
Partgap | 18 | 3 | 5 | 5 | 242.087 | 264 | 259.667 | 277.246 | 13.1028 | |
Partgap | 19 | 3 | 5 | 5 | 242.087 | 258 | 259.667 | 277.246 | 13.1028 | |
Partgap | 20 | 3 | 5 | 5 | 242.087 | 248 | 259.667 | 277.246 | 13.1028 | |
Partgap | 21 | 3 | 5 | 5 | 242.087 | 248 | 259.667 | 277.246 | 13.1028 |
This data set contains one observation for each subgroup sample. The variables _SUBX_
and _SUBN_
contain the subgroup means and sample sizes. The variables _LCLX_
and _UCLX_
contain the lower and upper control limits, and the variable _MEAN_
contains the central line. The variables _VAR_
and Sample
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 Gaptable
and display an chart (not shown here) identical to the chart in Figure 18.97:
title 'Mean Chart for Gap Widths'; proc shewhart table=Gaptable; xchart Partgap*Sample; label _SUBX_ = 'Gap Width'; 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.