Chapter Contents Previous Next
 XRCHART Statement

## Saving Summary Statistics

 See SHWXR1 in the SAS/QC Sample Library

In this example, the XRCHART 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 WAFERS and create a summary data set named WAFRHIST:

```   title 'Summary Data Set for Wafer Diameters';
proc shewhart data=wafers;
xrchart diamtr*batch / outhistory = wafrhist
nochart;
run;
```

The OUTHISTORY= option names the output data set, and the NOCHART option suppresses the display of the charts. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the XRCHART statement. A complete list of options is presented in the "Syntax" section.

Figure 43.5 contains a listing of WAFRHIST.

 Summary Data Set for Wafer Diameters

 batch diamtrX diamtrR diamtrN 1 34.992 0.02 5 2 34.994 0.03 5 3 34.998 0.01 5 4 34.998 0.02 5 5 34.992 0.02 5 6 34.996 0.01 5 7 34.996 0.03 5 8 34.992 0.02 5 9 34.992 0.03 5 10 35.000 0.02 5 11 34.996 0.03 5 12 34.994 0.03 5 13 34.992 0.03 5 14 34.998 0.02 5 15 34.988 0.02 5 16 35.000 0.02 5 17 34.984 0.01 5 18 35.002 0.04 5 19 34.988 0.02 5 20 34.994 0.01 5 21 34.992 0.02 5 22 35.002 0.01 5 23 35.004 0.04 5 24 34.996 0.03 5 25 34.994 0.01 5
Figure 43.5: The Summary Data Set WAFRHIST

There are four variables in the data set WAFRHIST.

• BATCH contains the subgroup index.
• DIAMTRX contains the subgroup means.
• DIAMTRR contains the subgroup ranges.
• DIAMTRN contains the subgroup sample sizes.

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