DM 'LOG; CLEAR; OUT; CLEAR;'; ODS PRINTER PDF file='C:\COURSES\ST528\SAS\cp1.pdf'; ODS LISTING; OPTIONS LS=78 PS=500 NONUMBER NODATE; *******************************************************************; *** NORMAL AND GAMMA VARIATES FROM DISTRIBUTIONS WITH MEAN = 20 ***; *******************************************************************; DATA in; DO N = 1 TO 250; _normal = 20 + RANNOR(5510); ** NORMAL(20,1) **; _gamma = .5*RANGAM(20921,40); ** GAMMA(.5,40) **; OUTPUT; END; SYMBOL1 VALUE=dot WIDTH=3 L=1; TITLE 'PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA'; PROC CAPABILITY DATA=in; VAR _normal _gamma; ** Specify responses ; SPEC LSL=17 USL=23 TARGET=20 ; ** Enter specifications; *** Make histograms of the normal and gamma data ; *** with the MLE normal pdf and statistics superimposed ; HISTOGRAM _normal _gamma / NORMAL(INDICES); INSET MEAN (5.3) STD='Std Dev' (5.3) SKEWNESS (5.3) KURTOSIS (5.3) / HEADER = 'Summary Statistics' POS = NE; INSET N CP (4.2) CPK (4.2) CPM (4.2) / POS = NW; *** Make histograms of the normal and gamma data ; *** with the MLE gamma pdf and statistics superimposed ; HISTOGRAM _normal _gamma / GAMMA(THETA=0 INDICES); INSET MEAN (5.3) STD='Std Dev' (5.3) SKEWNESS (5.3) KURTOSIS (5.3) / HEADER = 'Summary Statistics' POS = NE; INSET N CP (4.2) CPK (4.2) CPM (4.2) / POS = NW; *** Make empirical CDF plots of the normal and gamma data ; *** with the MLE normal CDF superimposed ; CDFPLOT _normal _gamma / NORMAL; *** Make QQ and PP plots of the normal data ; QQPLOT _normal / NORMAL; PPPLOT _normal / NORMAL; RUN;