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 upper X overbar 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

The SPC Procedure

Means and Ranges Chart Summary for ALLPROCESSES
processnamesubgroupnameNumber of
Subgroups
MeansRanges
Number
> UCL
Number
< LCL
Number
> UCL
Number
< LCL
DelayDay113122
DiameterBatch450100

Specification Limits and Capability Indices for ALLPROCESSES
processnamesubgroupnameLSLTargetUSLCpCPLCPUCpkCpm
AmountBatch11.95000012.00000012.0500000.3793180.2289580.5296790.2289580.345768
BreakstrengthSample52.00000060.000000..1.259258.1.2592581.262873
KWattsDay3400.0000003500.0000004000.0000000.4952040.1610380.8293690.1610380.165056
PartgapSample250.000000260.000000270.0000000.2477610.2476400.2478820.2476400.247761
TimeLot7.8500008.0000008.1500001.0219411.0428341.0010481.0010481.019939
WeightLot23.00000024.00000025.0000000.1430370.2307900.0552840.0552840.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.

Last updated: September 22, 2026