The mChart action produces median charts for subgroup medians. This type of control chart is used to analyze the central tendency of a process. It is preferred over an X-bar chart when the distribution of the data is skewed or when preventing the influence of extreme values (outliers) is a priority. This action can also generate accompanying range charts (R charts) or standard deviation charts (S charts) to monitor process variability.
| Parameter | Description |
|---|---|
| allN | When set to True, includes all subgroups regardless of whether the subgroup sample size equals the nominal sample size. |
| chartsTable | Specifies the charts summary output data table. |
| ciAlpha | Specifies the confidence level that is used to compute capability index confidence limits. |
| ciIndices | When set to True, computes capability index confidence limits that are based on subgroup summary data. |
| ciType | Specifies the type of confidence limits that are computed for capability indices: lower, upper, or two-sided. |
| 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 occur. |
| groupByLimit | Suppresses the analysis if the number of groups exceeds the specified value. |
| limitN | Specifies a nominal sample size for the control limits. |
| limitsTable | Specifies the control limits data table. |
| medCentral | Specifies the method of estimating the process mean. |
| no3SigmaCheck | When set to True, enables tests for special causes when the control limits are not three sigma limits. |
| outLimitsTable | Specifies the output control limits data table. |
| outputTables | Lists the names of results tables to save as CAS tables on the server. |
| primaryTests | Requests one or more tests for special causes for the primary control chart. |
| 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 of estimating the process standard deviation. |
| specsTable | Specifies the specification limits data table and computes process capability indices. |
| 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 settings for an input table. |
| test2Run | Specifies the length of the pattern for Test 2. |
| test3Run | Specifies the length of the pattern for Test 3. |
| testNStd | When set to True, enables tests for special causes with varying subgroup sample sizes. |
| testOverlap | When set to True, applies tests for special causes to overlapping patterns of points. |
This SAS DATA step generates a sample dataset named 'mycas.pistons'. It simulates the diameter measurements of piston rings, organized into 20 subgroups (by Hour) of five measurements each. A known process shift is introduced in the second half of the data to demonstrate how the control chart detects changes.
| 1 | DATA mycas.pistons; |
| 2 | label hour='Hour' diameter='Diameter (in cm)'; |
| 3 | keep hour diameter; |
| 4 | DO hour = 1 to 20; |
| 5 | DO i = 1 to 5; |
| 6 | IF (hour < 11) THEN diameter = 5.0 + rannor(1234); |
| 7 | ELSE diameter = 5.5 + rannor(1234); |
| 8 | OUTPUT; |
| 9 | END; |
| 10 | END; |
| 11 | RUN; |
This example creates a basic median (m) chart for the `pistons` data set. The chart plots the subgroup medians of the `diameter` variable, with subgroups defined by the `hour` variable. This helps monitor whether the process center is stable over time.
| 1 | PROC CAS; |
| 2 | spc.mChart / |
| 3 | TABLE={name='pistons'}, |
| 4 | processValue='diameter', |
| 5 | subgroupValue='hour'; |
| 6 | RUN; |
This example creates a median chart and an accompanying range chart (since subgroup sizes are less than 10). It applies several tests for special causes (Tests 1, 2, and 3) to formally detect patterns indicating an out-of-control process. The results, including chart data and control limits, are saved to `mycas.PistonCharts` and `mycas.PistonLimits` respectively for further analysis or reporting.
| 1 | PROC CAS; |
| 2 | spc.mChart / |
| 3 | TABLE={name='pistons'}, |
| 4 | processValue='diameter', |
| 5 | subgroupValue='hour', |
| 6 | primaryTests={test1=true, test2=true, test3=true}, |
| 7 | chartsTable={name='PistonCharts', replace=true}, |
| 8 | outLimitsTable={name='PistonLimits', replace=true}; |
| 9 | RUN; |