EWMACHART Statement: MACONTROL Procedure

Saving Summary Statistics

See MACEW1 in the SAS/QC Sample LibraryIn this example, the EWMACHART tatement is used to create a summary data set that can be read later by the MACONTROL procedure (as in the preceding example). The following statements read measurements from the data set Clips1 and create a summary data set named Cliphist:

title 'Summary Data Set for Gap Measurements';
proc macontrol data=Clips1;
   ewmachart Gap*Day / weight     = 0.3
                       outhistory = Cliphist
                       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 9.3.

Figure 9.6 contains a partial listing of Cliphist.

Figure 9.6: The Summary Data Set Cliphist

Summary Data Set for Gap Measurements

Day GapX GapS GapE GapN
1 14.904 0.18716 14.9362 5
2 15.014 0.09317 14.9595 5
3 14.866 0.25006 14.9315 5
4 15.048 0.23732 14.9664 5
5 15.024 0.26792 14.9837 5


There are five variables in the data set Cliphist.

  • Day contains the subgroup index.

  • GapX contains the subgroup means.

  • GapS contains the subgroup standard deviations.

  • GapE contains the subgroup exponentially weighted moving averages.

  • GapN contains the subgroup sample sizes.

Note that the summary statistic variables are named by adding the suffix characters X, S, E, and N to the process Gap specified in the EWMACHART 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.