EWMACHART Statement: MACONTROL Procedure

Example 9.4 Displaying Individual Measurements on an EWMA Chart

Note: See EWMA Chart with Individual Measurements in the SAS/QC Sample Library.

In the manufacture of automotive tires, the diameter of the steel belts inside the tire is measured. The following data set contains these measurements for 30 tires:

data Tires;
   input Sample Diameter @@;
   datalines;
 1  24.05    2  23.99    3  23.95
 4  23.93    5  23.97    6  24.02
 7  24.06    8  24.10    9  23.98
10  24.03   11  23.91   12  24.06
13  24.06   14  23.96   15  23.98
16  24.06   17  24.01   18  24.00
19  23.93   20  23.92   21  24.09
22  24.11   23  24.05   24  23.98
25  23.98   26  24.06   27  24.02
28  24.06   29  23.97   30  23.96
;

The following statements use the IRCHART statement in the SHEWHART procedure (see IRCHART Statement: SHEWHART Procedure) to create a data set containing the control limits for individual measurements and moving range charts for Diameter:

proc shewhart data=Tires;
   irchart Diameter*Sample / nochart outlimits=Tlimits;
run;

A listing of the data set Tlimits is shown in Output 9.4.1.

Output 9.4.1: Listing of the Data Set Tlimits

Control Limits for Diameter Measurements

_VAR_ _SUBGRP_ _TYPE_ _LIMITN_ _ALPHA_ _SIGMAS_ _LCLI_ _MEAN_ _UCLI_ _LCLR_ _R_ _UCLR_ _STDDEV_
Diameter Sample ESTIMATE 2 .002699796 3 23.8571 24.0083 24.1596 0 0.056897 0.18585 0.050423


The upper and lower control limits for the diameter measurements are 24.1596 and 23.8571, respectively.

In this example, reference lines will be used to display the control limits for the individual measurements on the EWMA chart. The following DATA step reads these control limits from Tlimits and creates a data set named Vrefdata, which contains the reference line information:

data Vrefdata;
   set Tlimits;
   length _reflab_ $16.;
   keep _ref_ _reflab_;
   _ref_ = _lcli_; _reflab_= 'LCL for X'; output;
   _ref_ = _ucli_; _reflab_= 'UCL for X'; output;
run;

A listing of the data set Vrefdata is shown in Output 9.4.2.

Output 9.4.2: Listing of the Data Set Vrefdata

Reference Line Information

_reflab_ _ref_
LCL for X 23.8571
UCL for X 24.1596


The following statements request an EWMA chart for these measurements:

ods graphics on;
title 'EWMA Chart for Steel Belt Diameters';
proc macontrol data=Tires;
   ewmachart Diameter*Sample / weight     = 0.3
                               meansymbol = square
                               lcllabel   = 'LCL for EWMA'
                               ucllabel   = 'UCL for EWMA'
                               vref       = Vrefdata
                               odstitle   = title
                               vreflabpos = 3
                               markers;
run;

The MEANSYMBOL= option displays the individual measurements on the EWMA chart. By default, these values are not displayed. For traditional graphics, the MEANSYMBOL= option specifies the symbol used to plot the individual measurements. For ODS Graphics, specifying a MEANSYMBOL= value causes the subgroup means to be plotted, but the symbol used is determined by the ODS style in effect. The VREF= option reads the reference line information from Vrefdata. The resulting chart is shown in Output 9.4.3.

Output 9.4.3 indicates that the process is in control. None of the diameter measurements (indicated by squares) exceed their control limits, and none of the EWMAs exceed their limits.

Output 9.4.3: Displaying Individual Measurements on EWMA Chart