BOXCHART Statement: SHEWHART Procedure

Reading Preestablished Control Limits

See SHWBOXA in the SAS/QC Sample LibraryIn the previous example, the OUTLIMITS= data set TURBLIM saved control limits computed from the measurements in Turbine. This example shows how these limits can be applied to new data. The following statements create the box chart in Figure 17.13 using new measurements in a data set named Turbine2 (not listed here) and the control limits in TURBLIM:

title 'Box Chart for Power Output';
ods graphics on;
proc shewhart data=Turbine2 limits=Turblim;
   boxchart KWatts*Day / odstitle=title;
run;

The ODS GRAPHICS ON statement specified before the PROC SHEWHART statement enables ODS Graphics, so the box chart is created by using ODS Graphics instead of traditional graphics.

The LIMITS= option in the PROC SHEWHART statement specifies the data set containing the control limits. By default,[51] this information is read from the first observation in the LIMITS= data set for which

  • the value of _VAR_ matches the process name KWatts

  • the value of _SUBGRP_ matches the subgroup-variable name Day

The chart reveals an increase in variability beginning on August 1.

Figure 17.13: Box Chart for Second Set of Power Outputs (ODS Graphics)

Box Chart for Second Set of Power Outputs (ODS Graphics)


In this example, the LIMITS= data set was created in a previous run of the SHEWHART procedure. You can also create a LIMITS= data set with the DATA step. See LIMITS= Data Set for details concerning the variables that you must provide.



[51] In SAS 6.09 and in earlier releases, it is also necessary to specify the READLIMITS option to read control limits from a LIMITS= data set.