Chapter Contents Previous Next
 MACHART Statement

## Example 21.1: Specifying Standard Values for the Process Mean and Process Standard Deviation

 See MACMA2 in the SAS/QC Sample Library

By default, the MACHART statement estimates the process mean ()and standard deviation ()from the data. This is illustrated in the "Getting Started" section of this chapter. However, there are applications in which standard values ( and ) are available based, for instance, on previous experience or extensive sampling. You can specify these values with the MU0= and SIGMA0= options. For example, suppose it is known that the metal clip manufacturing process (introduced in "Creating Moving Average Charts from Raw Data" ) has a mean of 15 and standard deviation of 0.2. The following statements specify these standard values:

title 'Specifying Standard Process Mean and Standard Deviation';
symbol v=dot c=yellow;
proc macontrol data=clips1;
machart gap*day / mu0      = 15
sigma0   = 0.2
span     = 4
xsymbol  = mu0
cframe   = steel
cinfill  = vpab
connect  = yellow
coutfill = salmon;
run;

The XSYMBOL= option specifies the label for the central line. The resulting chart is shown in Output 21.1.1.

Output 21.1.1: Specifying Standard Values with MU0= and SIGMA0=

The central line and control limits are determined using and (see the equations in Table 21.19). Output 21.1.1 indicates that the process is out-of-control since the moving averages for DAY=17, DAY=19, and DAY=20 lie below the lower control limit.

You can also specify and with the variables _MEAN_ and _STDDEV_ in a LIMITS= data set, as illustrated by the following statements:

data cliplim;
length _var_ _subgrp_ _type_ \$8;
_var_    = 'gap';
_subgrp_ = 'day';
_type_   = 'STANDARD';
_limitn_ = 5;
_mean_   = 15;
_stddev_ = 0.2;
_span_   = 4;
run;

proc macontrol data=clips1 limits=cliplim;
machart gap*day / xsymbol=mu0;
run;

The variable _SPAN_ is required, and its value provides the number of terms in the moving average. The variables _VAR_ and _SUBGRP_ are also required, and their values must match the process and subgroup-variable, respectively, specified in the MACHART statement. The bookkeeping variable _TYPE_ is not required, but it is recommended to indicate that the variables _MEAN_ and _STDDEV_ provide standard values rather than estimated values.

The resulting chart (not shown here) is identical to the one shown in Output 21.1.1.

 Chapter Contents Previous Next Top