MACHART Procedure
Creates a standard or Exponentially Weighted Moving Average (EWMA) chart of a process mean. If you provide a weight, an EWMA chart will be produced. If you do not provide a 'weight' you must then provide a width value for the standard moving average chart.
Usage
MACHART, data
Input Parameters
data—A one or two dimensional array of process data. A 1D-array contains summarized data i.e., sample means for each sample, and requires the 'PSigma' and 'Sampn' keywords (below).
A 2D-array must be of the form MxN, where M is the number of samples and N is the number of observations in each sample. Each sample must contain the same number of observations.For example, if you take 4 measurements from each of 16 production runs you must arrange the data into a 16x4 array.
Keywords
AnnotColor—A color index for the chart annotation. (Defaults to !P.COLOR)
Background—A color index for the plot background.
CLineColor—A color index for the central(mean) line. (Defaults to !P.COLOR)
CLineStyle—A linestyle value for the central line (Defaults to solid)
ClineThick—A thickness value for the central line. (Defaults to 1.0)
Color—A color index fo9r the plot axes. (Defaults to !P.COLOR)
LCLLineStyle—A linestyle value for the Lower Control Limit(LCL) line. (Defaults to solid)
LCLThick—A thickness value for the LCL line. (Defaults to 1.0)
LCLColor—A color index for the LCL line. (Defaults to !P.COLOR)
Limit—The control limit expressed as multiples of sigma. (Defaults to 3)
NoAnnot—Toggle to suppress annotation.
NoCLine—Toggle to suppress the central line.
NoLCL—Toggle to suppress the LCL line.
NoUCL—Toggle to suppress the Upper Control Limit(UCL) line.
PMean—Known Population mean. If this keyword is not provided the mean is calculated from the data.
PSigma—For 2D data: Scalar value to override the calculation of the standard deviation.
For 1D data: (required)—An array containing a standard deviation for each sample mean in the input data.
PlotColor—A color index or array of color indices for the data points. (Defaults to !P.COLOR)
PlotLineStyle—A linestyle value for the data points. (Defaults to solid)
PlotThick—Line thickness value for the data plot. (Defaults to 1.0)
PSym—Plot symbol for the data points.
RefLinePoints—Data value or array of values along the Yaxis at which to place horizontal reference lines.
RefLineColor—Color index or array of color indices for the horizontal reference line(s).
RefLineStyle—Linestyle value or array of linestyle values for the horizontal reference line(s).
RefLineThick—Line thickness value or array of line thickness values for the horizontal reference lines.
RefLineLabel—String or array of strings used to label the horizontal reference line(s).
Sampn—1D input data: A scalar or array representing the number of observations in each sample. A scalar indicates the sample size is constant. 2D input data: Not required.
Tickformat—Format specifier for the tick labels on the Y axis.
Title—String for the plot title.
UCLLineStyle—A scalar linestyle value for the UCL line.
UCLLineThick—Scalar thickness value for the UCL line.
UCLLineColor—A color index for the UCL line.
Weight—The weight factor for an EWMA chart. If you do not provide a weight then a standard moving average chart will be produced and you must provide a 'width' value. A weight of '1' essentially creates an X bar chart.
Width—The width of the moving average. If you do not provide a 'weight' value to create an EWMA chart, you must provide a 'width'.
XSize—The width of the plot window in pixels. Must be accompanied by the 'YSize' keyword. (Defaults to 640)
XTitle—String for title of the X axis.
YSize—The height of the plot window in pixels. Must be accompanied by the 'XSize' keyword. (Defaults to 512)
YTitle—String for title of Y axis.
YTicks—Number of major tickmarks on the Y axis.
Example
; 3 observations each, from 6 samples
run1 = [15.09, 15.17, 14.99]
run2 = [14.87, 15.46, 15.01]
run3 = [15.00, 15.13, 14.68]
run4 = [14.94, 15.15, 14.69]
run5 = [14.65, 15.02, 15.12]
run6 = [15.01, 15.08, 15.13]
; Create a samples by observations (6x3) array
run = TRANSPOSE([[run1],[run2],[run3],[run4],[run5],[run6]])
; The chart shows a process within the std 3-sigma
; control limits
MACHART, run, width=2
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.