Note: See Mean (X-BAR) Chart Examples 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
:
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 18.97.
Figure 18.100 contains a partial listing of Gaphist
.
Figure 18.100: The Summary Data Set Gaphist
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 18.101 contains a partial listing of Gaphist2
.
Figure 18.101: 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.