spc

ewmaChart

Description

Produces exponentially weighted moving average (EWMA) charts. The EWMA chart is a time-weighted control chart used to monitor the mean of a process, giving less weight to data as they get older. It is particularly effective for detecting small shifts in the process mean.

Settings
ParameterDescription
allNWhen set to True, includes all subgroups regardless of whether the subgroup sample size equals the nominal sample size.
asymptoticWhen set to True, produces asymptotic control limits.
chartsTableSpecifies the charts summary output data table.
displaySpecifies a list of results tables to send to the client for display.
exChartWhen set to True, includes a control chart in the results only when exceptions occur.
groupByLimitSuppresses the analysis if the number of groups exceeds the specified value.
limitNSpecifies a nominal sample size for the control limits.
limitsTableSpecifies the control limits data table.
outLimitsTableSpecifies the output control limits data table.
outputTablesLists the names of results tables to save as CAS tables on the server.
processNameSpecifies the variable in the input data table that contains the names of processes to be analyzed.
processValueSpecifies the variable in the input data table that contains the process measurements to be analyzed.
resetWhen set to True, resets the value of the exponentially weighted moving average after each point outside the control limits.
sigmasSpecifies the width of the control limits as a multiple of the standard error of the subgroup summary statistic.
sMethodSpecifies the method of estimating the process standard deviation (RMSDF, SMVLUE, or SNOWEIGHT).
subgroupNameSpecifies the variable in the input data table that contains the names of subgroup variables.
subgroupValueSpecifies the variable in the input data table that contains the subgroup values.
tableSpecifies the settings for the input table.
weightSpecifies the weight (lambda) that is assigned to the most recent subgroup. The value must be between 0 and 1.
Data Preparation View data prep sheet
Creation of test data for EWMA analysis

Generates a dataset 'metalclips' containing gap measurements for metal clips produced over several days, to be used for process control analysis.

Copied!
1 
2DATA mycas.metalclips;
3INPUT day @;
4DO i=1 to 5;
5INPUT gap @;
6OUTPUT;
7END;
8drop i;
9DATALINES;
101 14.98 15.02 14.99 15.01 15.00 2 15.01 14.99 15.00 15.02 15.01 3 15.03 15.00 15.01 15.02 15.00 4 14.99 15.01 15.00 14.98 15.02 ;
11 
12RUN;
13 

Examples

Generates a basic EWMA chart using the gap measurements and day subgroups.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3spc.ewmaChart / TABLE={name="metalclips", caslib="mycas"} processValue="gap" subgroupValue="day";
4 
5RUN;
6 
Result :
An EWMA chart is produced showing the process mean over the days, using default weight settings.

Generates an EWMA chart with a specific weight factor and sigma limit, saving the calculated control limits and chart summary to CAS tables.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3spc.ewmaChart / TABLE={name="metalclips", caslib="mycas"} processValue="gap" subgroupValue="day" weight=0.2 sigmas=3 outLimitsTable={name="ewma_limits", caslib="mycas", replace=true} chartsTable={name="ewma_summary", caslib="mycas", replace=true};
4 
5RUN;
6 
Result :
The action produces an EWMA chart using a weight of 0.2 and 3-sigma limits. The calculated limits are saved to 'ewma_limits' and the summary statistics to 'ewma_summary'.

FAQ

What is the primary function of the ewmaChart action?
Which parameter is required to specify the input data table?
How do I identify the variable containing the process measurements?
How do I identify the variable containing subgroup values?
What does the 'weight' parameter control?
How can I configure the width of the control limits?
What option allows resetting the EWMA after a point exceeds limits?
What are the available methods for estimating process standard deviation?
How can I generate asymptotic control limits?
Which output tables can be generated by this action?