![]() Chapter Contents |
![]() Previous |
![]() Next |
COMPHISTOGRAM Statement |
See CAPCMH3 in the SAS/QC Sample Library |
Two suppliers (A and B) provide disk drives for a computer manufacturer. The manufacturer measures the disk drive opening width to compare the process capabilities of the suppliers and determine whether there has been an improvement from 1992 to 1993.
The following statements save the measurements in a data set named DISK. There are two classification variables, SUPPLIER and YEAR, and a format is associated with YEAR.
proc format ; value mytime 1 = '1992' 2 = '1993' ; data disk; input @1 supplier $10. year width; label width = 'Opening Width (inches)'; format year mytime.; datalines; Supplier A 1 1.8932 Supplier A 1 1.8952 . . . . . . Supplier B 1 1.8980 Supplier B 1 1.8986 Supplier A 2 1.8978 Supplier A 2 1.8966 . . . . . . Supplier B 2 1.8967 Supplier B 2 1.8997 ;
The following statements create the comparative histogram in Output 3.2.1:
title "Results of Supplier Training Program"; proc capability data=disk noprint; specs lsl = 1.8925 clsl = black llsl = 2 usl = 1.9027 cusl = black lusl = 3 ; comphist width / class = ( supplier year ) classkey = ('Supplier A' '1993') intertile = 1.0 vaxis = 0 10 20 30 ncols = 2 nrows = 2 cfill = orange cframetop = ligr cframeside = ligr cframe = ligr; inset cpk (4.2) / noframe pos = n; run;Output 3.2.1: Two-Way Comparative Histogram
![]() |
The VAXIS= option specifies the tick mark labels for the vertical axis, while NROWS=2 and NCOLS=2 specify a 2 ×2 arrangement for the tiles. The CFRAMESIDE= and CFRAMETOP= options specify fill colors for the row and column labels, and the CFILL= option specifies a fill color for the bars. The INSET statement is used to display the capability index Cpk for each cell. Output 3.2.1 provides evidence that both suppliers have reduced variability from 1992 to 1993.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.