The maChart action produces a uniformly weighted moving average (MA) chart. This type of chart is used to monitor a process by displaying the average of the measurements from a specified number of consecutive subgroups. It is particularly useful for detecting small shifts in the process mean over time.
| Parameter | Description |
|---|---|
| allN | When set to True, includes all subgroups regardless of whether the subgroup sample size equals the nominal sample size. |
| asymptotic | When set to True, produces asymptotic control limits. |
| chartsTable | Specifies the CAS output table to store the charts summary. |
| display | Specifies a list of results tables to send to the client for display. |
| exChart | When set to True, includes a control chart in the results only when exceptions (out-of-control points) occur. |
| groupByLimit | Suppresses the analysis if the number of groups exceeds the specified value. |
| limitN | Specifies a nominal sample size for the control limits when sample sizes are variable. |
| limitsTable | Specifies an input CAS table that contains pre-established control limits. |
| outLimitsTable | Specifies the CAS output table to store the calculated control limits. |
| outputTables | Lists the names of results tables to save as CAS tables on the server. |
| processName | Specifies the variable in the input data table that contains the names of processes to be analyzed. |
| processValue | Specifies the variable in the input data table that contains the process measurements to be analyzed. |
| sigmas | Specifies the width of the control limits as a multiple of the standard error of the subgroup summary statistic. |
| sMethod | Specifies the method for estimating the process standard deviation. Values can be 'RMSDF' (weighted root mean square), 'SMVLUE' (minimum variance linear unbiased estimate), or 'SNOWEIGHT' (unweighted). |
| span | Specifies the number of subgroups (span) used to calculate the moving average. This parameter is required. |
| subgroupName | Specifies the variable in the input data table that contains the names of subgroup variables. |
| subgroupValue | Specifies the variable in the input data table that contains the subgroup values. |
| table | Specifies the input CAS table containing the process data. |
This example creates a sample CAS table named 'parts' containing diameter measurements for parts manufactured over 15 days. Each day represents a subgroup with 5 measurements.
| 1 | DATA mycas.parts; |
| 2 | DO day = 1 to 15; |
| 3 | DO i = 1 to 5; |
| 4 | diameter = 10 + rannor(1234); |
| 5 | OUTPUT; |
| 6 | END; |
| 7 | END; |
| 8 | RUN; |
This example generates a simple moving average chart with a span of 3 subgroups. It uses the 'parts' table created previously, analyzing the 'diameter' variable with 'day' as the subgrouping variable.
| 1 | PROC CAS; |
| 2 | spc.maChart / |
| 3 | TABLE={name='parts'}, |
| 4 | processValue='diameter', |
| 5 | subgroupValue='day', |
| 6 | span=3; |
| 7 | RUN; |
This example creates a moving average chart with a wider span of 5 subgroups. It sets control limits at 3.5 standard errors (sigmas=3.5) and uses the RMSDF method to estimate process standard deviation. The control limits are saved to a CAS table named 'maLimits', and the chart summary data is saved to 'maChartSummary'.
| 1 | PROC CAS; |
| 2 | spc.maChart / |
| 3 | TABLE={name='parts'}, |
| 4 | processValue='diameter', |
| 5 | subgroupValue='day', |
| 6 | span=5, |
| 7 | sigmas=3.5, |
| 8 | sMethod='RMSDF', |
| 9 | outLimitsTable={name='maLimits', replace=true}, |
| 10 | chartsTable={name='maChartSummary', replace=true}; |
| 11 | RUN; |