Chapter Contents Previous Next
 MRCHART Statement

## Saving Summary Statistics

 See SHWMR1 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 DETERGNT and create a summary data set named DETHIST:

```   title 'Summary Data Set DETHIST for Detergent Box Weights';
proc shewhart data=detergnt;
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 36.2. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the MRCHART statement. A complete list of options is presented in the "Syntax" section.

Figure 36.5 contains a listing of 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 6 23.01 6.33 5 7 24.19 2.19 5 8 26.27 2.18 5 9 22.31 6.08 5 10 22.66 8.21 5 11 26.38 4.97 5 12 23.01 5.05 5 13 23.15 5.37 5 14 24.73 4.95 5 15 25.86 5.58 5 16 23.99 4.35 5 17 24.30 5.24 5 18 24.88 4.87 5 19 25.92 7.22 5 20 25.63 6.30 5 21 25.17 6.52 5 22 26.72 5.18 5 23 23.67 9.17 5 24 24.92 4.62 5 25 24.51 5.40 5 26 24.75 3.41 5 27 25.10 4.76 5 28 25.64 3.47 5
Figure 36.5: The Summary Data Set DETHIST

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.