Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
XCHART Statement

Saving Summary Statistics

See SHWXCHR in the SAS/QC Sample Library

In this example, the XCHART 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 PARTGAPS and create a summary data set named GAPHIST:

   title 'Summary Data Set for Gap Widths';
   proc shewhart data=partgaps;
      xchart partgap*sample / outhistory = gaphist
                              nochart;
   run;

The OUTHISTORY= option names the output data set, and the NOCHART option suppresses the display of the chart, which would be identical to the chart in Figure 42.2.

Figure 42.5 contains a listing of GAPHIST.

 
Summary Data Set for Gap Widths

sample partgapX partgapR partgapN
1 270 35 5
2 258 25 5
3 248 24 5
4 260 39 5
5 273 29 5
6 260 21 5
7 259 37 5
8 248 37 5
9 260 28 5
10 255 19 5
11 268 36 5
12 253 36 5
13 273 29 5
14 275 22 5
15 257 24 5
16 269 41 5
17 249 36 5
18 264 31 5
19 258 25 5
20 248 36 5
21 248 30 5
Figure 42.5: The Summary Data Set GAPHIST

There are four variables in the data set GAPHIST.

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

If you specify the STDDEVIATIONS option, the OUTHISTORY= data set includes a subgroup standard deviation variable rather than a subgroup range variable, as demonstrated by the following statements:

   title 'Summary Data Set with Subgroup Standard Deviations';
   proc shewhart data=partgaps;
      xchart partgap*sample / outhistory = gaphist2
                              stddeviations
                              nochart;
   run;

Figure 42.6 contains a listing of GAPHIST2.

 
Summary Data Set with Subgroup Standard Deviations

sample partgapX partgapS partgapN
1 270 12.6293 5
2 258 10.2225 5
3 248 10.6771 5
4 260 14.2302 5
5 273 11.2027 5
6 260 8.7178 5
7 259 13.3791 5
8 248 13.5093 5
9 260 12.2270 5
10 255 7.8102 5
11 268 16.2327 5
12 253 15.0333 5
13 273 10.6536 5
14 275 8.2765 5
15 257 10.3923 5
16 269 14.8829 5
17 249 14.8661 5
18 264 12.0623 5
19 258 8.8882 5
20 248 13.0384 5
21 248 12.0000 5
Figure 42.6: The Summary Data Set GAPHIST2

The variable PARTGAPS, which contains the subgroup standard deviations, is named by adding the suffix character S to the process PARTGAP.

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

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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