SCHART Statement: SHEWHART Procedure

Saving Summary Statistics

See SHWSCHR in the SAS/QC Sample LibraryIn 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:

proc shewhart data=Turbine;
   schart KWatts*Day / outhistory = Turbhist
                       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 17.78. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the SCHART statement. A complete list of options is presented in the section Syntax: SCHART Statement.

Figure 17.81 contains a partial listing of Turbhist.

Figure 17.81: The Summary Data Set 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


There are four variables in the data set Turbhist.

  • Day contains the subgroup index.

  • KWattsX contains the subgroup means.

  • KWattsS contains the subgroup standard deviations.

  • KWattsN contains the subgroup sample sizes.

The subgroup mean variable is included even though it is not required by the SCHART statement. This enables 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.