MRCHART Statement: SHEWHART Procedure

Saving Summary Statistics

Note: See Median and Range Charts Examples in the SAS/QC Sample Library.

In this example, the MRCHART statement is used to create a summary data set that can be read later by the SHEWHART procedure (as in the preceding example). The following statements read measurements from the data set Detergent and create a summary data set named Dethist:

proc shewhart data=Detergent;
   mrchart Weight*Lot / outhistory = Dethist
                        nochart;
run;

The OUTHISTORY= option names the output data set, and the NOCHART option suppresses the display of the charts, which would be identical to the charts in FigureĀ 18.44. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the MRCHART statement. A complete list of options is presented in the section Syntax: MRCHART Statement.

FigureĀ 18.47 contains a partial listing of Dethist.

Figure 18.47: The Summary Data Set Dethist

Summary Data Set DETHIST for Detergent Box Weights

Lot WeightM WeightR WeightN
1 22.56 9.54 5
2 23.54 3.07 5
3 24.35 4.65 5
4 25.52 5.05 5
5 23.25 8.04 5



There are four variables in the data set Dethist.

  • Lot contains the subgroup index.

  • WeightM contains the subgroup medians.

  • WeightR contains the subgroup ranges.

  • WeightN contains the subgroup sample sizes.

Note that the summary statistic variables are named by adding the suffix characters M, R, and N to the process Weight specified in the MRCHART statement. In other words, the variable naming convention for OUTHISTORY= data sets is the same as that for HISTORY= data sets.

For more information, see OUTHISTORY= Data Set.