See SHWXS1 in the SAS/QC Sample LibraryIn this example, the XSCHART 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
(see Creating Charts for Means and Standard Deviations from Raw Data) and create a summary data set named Turbhist
:
proc shewhart data=Turbine; xschart KWatts*Day / outhistory = Turbhist 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 those in Figure 17.114. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the XSCHART statement. A complete list of options is presented in the section Syntax: XSCHART Statement.
Figure 17.117 contains a partial listing of Turbhist
.
Figure 17.117: 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.
Note that the summary statistic variables are named by adding the suffix characters X, S, and N to the process KWatts
specified in the XSCHART 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.