*Program 16-1 PROC MEANS with all the defaults; title "PROC MEANS With All the Defaults"; proc means data=learn.blood; run; *Program 16-2 Adding a VAR statement and requesting specific statistics with PROC MEANS; title "Selected Statistics Using PROC MEANS"; proc means data=learn.blood n nmiss mean median min max maxdec=1; var RBC WBC; run; *Program 16-3 Adding a BY statement to PROC MEANS; proc sort data=learn.blood out=blood; by Gender; run; title "Adding a BY Statement to PROC MEANS"; proc means data=learn.blood n nmiss mean median min max maxdec=1; by Gender; var RBC WBC; run; *Program 16-4 Using a CLASS statement with PROC MEANS; title "Using a CLASS Statement with PROC MEANS"; proc means data=learn.blood n nmiss mean median min max maxdec=1; class Gender; var RBC WBC; run; *Program 16-5 Demonstrating the effect of a formatted CLASS variable; proc format; value chol_group low -< 200 = 'Low' 200 - high = 'High'; run; proc means data=learn.blood n nmiss mean median maxdec=1; title "Using a CLASS Statement with PROC MEANS"; class Chol; format Chol chol_group.; var RBC WBC; run;