See SHWXCHR in the SAS/QC Sample LibraryIn 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
:
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 17.96.
Figure 17.99 contains a partial listing of Gaphist
.
Figure 17.99: The Summary Data Set 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 |
There are four variables in the data set Gaphist
.
Sample
contains the subgroup index.
PartgapX
contains the subgroup means.
PartgapR
contains the subgroup ranges.
PartgapN
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 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:
proc shewhart data=Partgaps; xchart Partgap*Sample / outhistory = Gaphist2 stddeviations nochart; run;
Figure 17.100 contains a partial listing of Gaphist2
.
Figure 17.100: The Summary Data Set 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 |
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.