Comparative histograms are useful for comparing the distribution of a process variable across levels of classification variables. You can use the COMPHISTOGRAM statement to create one-way and two-way comparative histograms. When used with a single classification variable, the COMPHISTOGRAM statement displays an array of component histograms (stacked or side-by-side), one for each level of the classification variable. When used with two classification variables, the COMPHISTOGRAM statement displays a matrix of component histograms, one for each combination of levels of the classification variables.
In quality improvement applications, typical uses of comparative histograms include
comparing the capability of a process before and after an improvement
comparing process capabilities of two or more suppliers
exploring stratification in process data due to different lots, machines, manufacturing methods, and so forth
studying the evolution of process capability over successive time periods
You can use options in the COMPHISTOGRAM statement to
specify the midpoints or endpoints for histogram intervals
specify the number of rows and/or columns of component histograms
display specification limits on the component histograms
display density curves for fitted normal distributions
display kernel density estimates
request graphical enhancements
inset summary statistics and process capability indices on the component histograms
You have two alternatives for producing comparative histograms with the COMPHISTOGRAM statement:
ODS Graphics output is produced if ODS Graphics is enabled, for example by specifying the ODS GRAPHICS ON statement prior to the PROC statement.
Otherwise, traditional graphics are produced if SAS/GRAPH® is licensed.
See Chapter 3: SAS/QC Graphics, for more information about producing these different kinds of graphs.
Note: You cannot use the COMPHISTOGRAM statement together with the CLASS statement.