EWMACHART Statement: MACONTROL Procedure

Syntax: EWMACHART Statement

The basic syntax for the EWMACHART statement is as follows:

EWMACHART process $*$ subgroup-variable / WEIGHT=value <options> ;

The general form of this syntax is as follows:

EWMACHART processes $*$ subgroup-variable <(block-variables)><=symbol-variable | ='character'> / WEIGHT=value <options> ;

Note that the WEIGHT= option is required unless its value is read from a LIMITS= data set. You can use any number of EWMACHART statements in the MACONTROL procedure. The components of the EWMACHART statement are described as follows.


identify one or more processes to be analyzed. The specification of process depends on the input data set specified in the PROC MACONTROL statement.

  • If raw data are read from a DATA= data set, process must be the name of the variable containing the raw measurements. For an example, see Creating EWMA Charts from Raw Data.

  • If summary data are read from a HISTORY= data set, process must be the common prefix of the summary variables in the HISTORY= data set. For an example, see Creating EWMA Charts from Subgroup Summary Data.

  • If summary data and control limits are read from a TABLE= data set, process must be the value of the variable _VAR_ in the TABLE= data set. For an example, see Saving Control Limit Parameters.

A process is required. If more than one process is specified, enclose the list in parentheses. For example, the following statements request distinct EWMA charts (each using a weight parameter of 0.3) for Weight, Length, and Width:

proc macontrol data=Measures;
   ewmachart (Weight Length Width)*Day / weight=0.3;

is the variable that classifies the data into subgroups. The subgroup-variable is required. In the preceding EWMACHART statement, Day is the subgroup variable. For details, see Subgroup Variables.


are optional variables that group the data into blocks of consecutive subgroups. The blocks are labeled in a legend, and each block-variable provides one level of labels in the legend. See Displaying Stratification in Blocks of Observations for an example.


is an optional variable whose levels (unique values) determine the symbol marker or plotting character used to plot the EWMAs.

  • If you produce a line printer chart, an 'A' is displayed for the points corresponding to the first level of the symbol-variable, a 'B' is displayed for the points corresponding to the second level, and so on.

  • If you produce traditional graphics, distinct symbol markers are displayed for points corresponding to the various levels of the symbol-variable. You can specify the symbol markers with SYMBOLn statements. See Displaying Stratification in Levels of a Classification Variable for an example.


specifies a plotting character for line printer charts. For example, the following statements create an EWMA chart using an asterisk (*) to plot the points:

proc macontrol data=Values lineprinter;
   ewmachart Length*Hour='*' / weight=0.3;

specify chart parameters, enhance the appearance of the chart, request additional analyses, save results in data sets, and so on. The section Summary of Options, which follows, lists all options by function.