Scénario de test & Cas d'usage
Creating a dataset simulating 20 days of fabric roll inspections. Days 10-19 show a slight systematic increase in defects to trigger Test 2.
| 1 | |
| 2 | DATA mycas.FabricRolls; |
| 3 | INPUT Day date9. Defects; |
| 4 | FORMAT Day date9.; |
| 5 | DATALINES; |
| 6 | 01JAN2024 5 02JAN2024 4 03JAN2024 6 04JAN2024 5 05JAN2024 20 06JAN2024 5 07JAN2024 4 08JAN2024 5 09JAN2024 6 10JAN2024 8 11JAN2024 8 12JAN2024 9 13JAN2024 8 14JAN2024 9 15JAN2024 8 16JAN2024 8 17JAN2024 9 18JAN2024 8 19JAN2024 9 20JAN2024 4 ; |
| 7 | |
| 8 | RUN; |
| 9 |
| 1 | /* Data loaded in prep step */ |
| 1 | |
| 2 | PROC CAS; |
| 3 | spc.cChart / TABLE={name='FabricRolls'} processValue='Defects' subgroupValue='Day' primaryTests={test1=true, test2=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
The action should generate a c-chart. The point on 05JAN2024 (20 defects) should be flagged by Test 1 as an outlier. The sequence from 10JAN2024 to 19JAN2024 should trigger Test 2 (9 consecutive points above the center line), indicating a shift in the manufacturing process.