Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
BOXCHART Statement

Saving Control Limits

See SHWBOXA in the SAS/QC Sample Library

You can save the control limits for a box 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 TURBINE (see "Creating Box Charts from Raw Data" ) and save the control limits displayed in Figure 32.2 in a data set named TURBLIM:

   title 'Control Limits for Power Output Data';
   proc shewhart data=turbine;
      boxchart kwatts*day / outlimits=turblim
                            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 TURBLIM is listed in Figure 32.8.

 
Control Limits for Power Output Data

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _LCLX_ _MEAN_ _UCLX_ _LCLR_ _R_ _UCLR_ _STDDEV_
kwatts day ESTIMATE 20 .002699796 3 3357.14 3485.41 3613.68 296.159 714.15 1132.14 191.207
Figure 32.8: The Data Set TURBLIM Containing Control Limit Information

The data set TURBLIM contains one observation with the limits for process KWATTS. 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 \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. 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 box charts, but they are included so that the data set TURBLIM can be used to create an R chart; see Chapter 43, "XRCHART Statement". If you specify the STDDEVIATIONS option in the BOXCHART statement, the variables _LCLS_, _S_, and _UCLS_, rather than the variables _LCLR_, _R_, and _UCLR_, are included in the OUTLIMITS= data set. These variables can be used to create an s chart; see Chapter 44, "XSCHART Statement."

If you specify CONTROLSTAT=MEDIAN to request control limits for medians, the variables _LCLM_ and _UCLM_, rather than the variables _LCLX_ and _UCLX_, are included in the OUTLIMITS= data set as demonstrated by the following statements:

   title 'Control Limits for Power Output Data';
   proc shewhart data=turbine;
      boxchart kwatts*day / outlimits  =turblim2
                            controlstat=median
                            stddeviations
                            nochart;
   run;

Since the STDDEVIATIONS option is specified, the variables _LCLS_, _S_, and _UCLS_ are included in TURBLIM2, which is listed in Figure 32.9.

For more information, see "OUTLIMITS= Data Set" .

 
Control Limits for Power Output Data

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _LCLM_ _MEAN_ _UCLM_ _LCLS_ _S_ _UCLS_ _STDDEV_
kwatts day ESTIMATE 20 .002776264 3 3319.85 3481.63 3643.40 100.207 196.396 292.584 198.996
Figure 32.9: The Data Set TURBLIM2 Containing Control Limit Information

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

   title 'Summary Statistics and Control Limit Information';
   proc shewhart data=turbine;
      boxchart kwatts*day / outtable=turbtab
                            nochart;
   run;

The data set TURBTAB is listed in Figure 32.10.

 
Summary Statistics and Control Limit Information

_VAR_ day _SIGMAS_ _LIMITN_ _SUBN_ _LCLX_ _SUBX_ _MEAN_ _UCLX_ _EXLIM_ _SUBMIN_ _SUBQ1_ _SUBMED_ _SUBQ3_ _SUBMAX_
kwatts 04JUL 3 20 20 3357.14 3487.40 3485.41 3613.68   3180 3340.0 3490.0 3610.0 4050
kwatts 05JUL 3 20 20 3357.14 3471.65 3485.41 3613.68   3179 3333.5 3419.5 3605.0 3849
kwatts 06JUL 3 20 20 3357.14 3488.30 3485.41 3613.68   3304 3376.0 3456.5 3604.5 3781
kwatts 07JUL 3 20 20 3357.14 3434.20 3485.41 3613.68   3045 3390.5 3447.0 3550.0 3629
kwatts 08JUL 3 20 20 3357.14 3475.80 3485.41 3613.68   2968 3321.0 3487.0 3611.5 3916
kwatts 09JUL 3 20 20 3357.14 3518.10 3485.41 3613.68   3047 3425.5 3576.0 3615.0 3881
kwatts 10JUL 3 20 20 3357.14 3492.65 3485.41 3613.68   3002 3368.5 3495.5 3621.5 3787
kwatts 11JUL 3 20 20 3357.14 3496.40 3485.41 3613.68   3196 3346.0 3473.5 3592.5 3994
kwatts 12JUL 3 20 20 3357.14 3398.50 3485.41 3613.68   3115 3188.5 3426.0 3568.5 3731
kwatts 13JUL 3 20 20 3357.14 3456.05 3485.41 3613.68   3263 3340.0 3444.0 3505.5 4040
kwatts 14JUL 3 20 20 3357.14 3493.60 3485.41 3613.68   3215 3336.0 3441.5 3616.0 3872
kwatts 15JUL 3 20 20 3357.14 3563.30 3485.41 3613.68   3182 3409.5 3561.0 3719.5 3850
kwatts 16JUL 3 20 20 3357.14 3519.05 3485.41 3613.68   3212 3378.0 3515.0 3682.5 3769
kwatts 17JUL 3 20 20 3357.14 3474.20 3485.41 3613.68   3077 3329.0 3501.5 3599.5 3812
kwatts 18JUL 3 20 20 3357.14 3443.60 3485.41 3613.68   3061 3315.5 3435.0 3614.5 3815
kwatts 19JUL 3 20 20 3357.14 3586.35 3485.41 3613.68   3288 3426.5 3546.0 3762.5 3877
kwatts 20JUL 3 20 20 3357.14 3486.45 3485.41 3613.68   3114 3373.0 3474.5 3635.5 3928
kwatts 21JUL 3 20 20 3357.14 3492.90 3485.41 3613.68   3167 3400.5 3488.0 3582.5 3801
kwatts 22JUL 3 20 20 3357.14 3432.80 3485.41 3613.68   3056 3322.0 3460.0 3561.0 3800
kwatts 23JUL 3 20 20 3357.14 3496.90 3485.41 3613.68   3145 3308.5 3495.0 3652.0 3917
Figure 32.10: The OUTTABLE= Data Set TURBTAB

This data set contains one observation for each subgroup sample. The variable _SUBMIN_ contains the subgroup minimums, and the variable _SUBQ1_ contains the first quartile for each subgroup. The variable _SUBX_ contains the subgroup means, and the variable _SUBMED_ contains the subgroup medians. The variable _SUBQ3_ contains the third quartiles, and the variable _SUBMAX_ contains the subgroup maximums. The variable _SUBN_ contains the subgroup sample sizes. The variables _LCLX_ and _UCLX_ contain the lower and upper control limits for the means. The variable _MEAN_ contains the central line. The variables _VAR_ and DAY 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 TURBTAB and display a box chart (not shown here) identical to the chart in Figure 32.2:

   title 'Box Chart for Power Output';
   symbol v=dot;
   proc shewhart table=turbtab;
      boxchart kwatts*day;
   label _SUBX_ = 'Average Power Output';
   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
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.