Chapter Contents
Chapter Contents
SCHART Statement

Saving Summary Statistics

See SHWSCHR in the SAS/QC Sample Library

In this example, the SCHART 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 TURBINE and create a summary data set named TURBHIST:

   title 'Summary Data Set for Power Output';
   proc shewhart data=turbine;
      schart kwatts*day / outhistory = turbhist

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 40.2. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the SCHART statement. A complete list of options is presented in the "Syntax" section.

Figure 40.5 contains a listing of TURBHIST.

Summary Data Set for Power Output

day kwattsX kwattsS kwattsN
04JUL 3487.40 220.260 20
05JUL 3471.65 210.427 20
06JUL 3488.30 147.025 20
07JUL 3434.20 157.637 20
08JUL 3475.80 258.949 20
09JUL 3518.10 211.566 20
10JUL 3492.65 193.779 20
11JUL 3496.40 212.024 20
12JUL 3398.50 199.201 20
13JUL 3456.05 173.455 20
14JUL 3493.60 187.465 20
15JUL 3563.30 205.472 20
16JUL 3519.05 173.676 20
17JUL 3474.20 200.576 20
18JUL 3443.60 222.084 20
19JUL 3586.35 185.724 20
20JUL 3486.45 223.474 20
21JUL 3492.90 145.267 20
22JUL 3432.80 190.994 20
23JUL 3496.90 208.858 20
Figure 40.5: The Summary Data Set TURBHIST

There are four variables in the data set TURBHIST.

The subgroup mean variable is included even though it is not required by the SCHART statement. This allows the data set to be used as a HISTORY= data set with the BOXCHART, XCHART, and XSCHART statements, as well as with the SCHART statement. Note that the summary statistic variables are named by adding the suffix characters X, S, and N to the process KWATTS specified in the SCHART 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" .

Chapter Contents
Chapter Contents

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