SPC Procedure
Example 32.2 Computing Process Capability Indices
(View the complete code for this example.)
You can use the SPC procedure to compute process capability indices for stable processes. The following statements create a data table that contains process specification limits for the processes in the data table mylib.AllProcesses:
data mylib.AllSpecs;
length processname $16;
input processname LSL Target USL;
datalines;
Amount 11.95 12.00 12.05
Breakstrength 52.0 60.0 .
Delay . 0 30
Diameter 34.98 35.00 35.01
KWatts 3400 3500 4000
Partgap 250 260 270
Time 7.85 8.0 8.15
Weight 23.0 24.0 25.0
;
Not all processes have both lower and upper specification limits. For example, the Breakstrength process variable measures the breaking strength of metal wire and has no upper specification limit.
The following statements read the specification limits and compute capability indices for processes that the and R chart analysis indicates are in statistical control:
proc spc data=mylib.AllProcesses;
xrchart / exchart specs=mylib.AllSpecs;
run;
The EXCHART option includes only processes whose exceptions are signaled in the exception summary table. The resulting output is shown in Output 32.2.1.
Output 32.2.1: Exception Summary and Capability Indices
| Means and Ranges Chart Summary for ALLPROCESSES | ||||||
|---|---|---|---|---|---|---|
| processname | subgroupname | Number of Subgroups | Means | Ranges | ||
| Number > UCL | Number < LCL | Number > UCL | Number < LCL | |||
| Delay | Day | 11 | 3 | 1 | 2 | 2 |
| Diameter | Batch | 45 | 0 | 1 | 0 | 0 |
| Specification Limits and Capability Indices for ALLPROCESSES | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| processname | subgroupname | LSL | Target | USL | Cp | CPL | CPU | Cpk | Cpm |
| Amount | Batch | 11.950000 | 12.000000 | 12.050000 | 0.379318 | 0.228958 | 0.529679 | 0.228958 | 0.345768 |
| Breakstrength | Sample | 52.000000 | 60.000000 | . | . | 1.259258 | . | 1.259258 | 1.262873 |
| KWatts | Day | 3400.000000 | 3500.000000 | 4000.000000 | 0.495204 | 0.161038 | 0.829369 | 0.161038 | 0.165056 |
| Partgap | Sample | 250.000000 | 260.000000 | 270.000000 | 0.247761 | 0.247640 | 0.247882 | 0.247640 | 0.247761 |
| Time | Lot | 7.850000 | 8.000000 | 8.150000 | 1.021941 | 1.042834 | 1.001048 | 1.001048 | 1.019939 |
| Weight | Lot | 23.000000 | 24.000000 | 25.000000 | 0.143037 | 0.230790 | 0.055284 | 0.055284 | 0.138324 |
When you use the EXCHART option in combination with the SPECS= option, each process is listed in either the exception summary table or the capability indices table, but not both.