The cChart action produces a c-chart, which is a control chart for the number of nonconformities (defects) in a unit. The input data consists of counts of nonconformities for each subgroup. This chart is used in statistical process control (SPC) to monitor processes where the items being inspected can have multiple defects. The chart helps to determine if the process is in a state of statistical control.
| 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. |
| 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. |
| 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 (Tests 1-8). |
| 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. |
| subgroupN | Specifies subgroup sample sizes for attributes charts. |
| 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 data table for the analysis. |
| test2Run | Specifies the length of the pattern for Test 2 (default is 9). |
| test3Run | Specifies the length of the pattern for Test 3 (default is 6). |
| 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 code creates a sample dataset named 'Circuits'. Each record represents a batch of circuit boards inspected on a specific date, with 'Defects' indicating the number of nonconformities found.
| 1 | DATA mycas.Circuits; |
| 2 | INPUT Date date9. Defects @@; |
| 3 | FORMAT Date date9.; |
| 4 | DATALINES; |
| 5 | 05MAR2023 12 06MAR2023 15 07MAR2023 19 08MAR2023 14 09MAR2023 11 |
| 6 | 10MAR2023 10 11MAR2023 16 12MAR2023 18 13MAR2023 21 14MAR2023 13 |
| 7 | 15MAR2023 17 16MAR2023 12 17MAR2023 25 18MAR2023 16 19MAR2023 14 |
| 8 | 20MAR2023 15 21MAR2023 18 22MAR2023 12 23MAR2023 11 24MAR2023 10 |
| 9 | ; |
| 10 | RUN; |
This example generates a standard c-chart for the number of defects per batch, using the 'Date' as the subgroup identifier.
| 1 | PROC CAS; |
| 2 | spc.cChart / |
| 3 | TABLE={name='Circuits'}, |
| 4 | processValue='Defects', |
| 5 | subgroupValue='Date'; |
| 6 | RUN; |
This example demonstrates a more advanced use case. It uses a separate table 'mycas.myLimits' to define the control limits instead of calculating them from the data. It also enables several tests (1, 2, and 3) to detect specific patterns that indicate special causes of variation in the process. The results, including the chart data, are saved to a new CAS table named 'CChartSummary'.
| 1 | PROC CAS; |
| 2 | spc.cChart / |
| 3 | TABLE={name='Circuits'}, |
| 4 | processValue='Defects', |
| 5 | subgroupValue='Date', |
| 6 | limitsTable={name='mycas.myLimits'}, |
| 7 | primaryTests={test1=true, test2=true, test3=true}, |
| 8 | chartsTable={name='CChartSummary', replace=true}; |
| 9 | RUN; |