/* The dataset has the formats below permanently assigned to certain variables. We do NOT need to rerun the DATA step used to assign the formats however we DO need to resubmit the PROC FORMAT so SAS will know the translations used */ PROC FORMAT; VALUE GDR 1 = "Male" 2 = "Female"; VALUE YN 1 = "Yes" 2 = "No"; VALUE EXER 1 = "High" 2 = "Moderate" 3 = "Low"; VALUE TREAT 1 = "Ran" 2 = "Sat"; RUN; /* PROC SGPLOT and VBOX or HBOX are also used to create boxplots by groups We must add one option of CATEGORY to define the grouping variable As always, we must request each plot with a separate SGPLOT procedure */ /* Boxplots of PULSE1 by GENDER */ PROC SGPLOT DATA=BIO.PULSE_STEP2; VBOX PULSE1 / CATEGORY = GENDER; RUN; /* Boxplots of PULSE1 by SMOKES */ PROC SGPLOT DATA=BIO.PULSE_STEP2; VBOX PULSE1 / CATEGORY = SMOKES; RUN; /* Boxplots of PULSE1 by ALCOHOL */ PROC SGPLOT DATA=BIO.PULSE_STEP2; VBOX PULSE1 / CATEGORY = ALCOHOL; RUN; /* Boxplots of PULSE1 by EXERCISE */ PROC SGPLOT DATA=BIO.PULSE_STEP2; VBOX PULSE1 / CATEGORY = EXERCISE; RUN; /* Boxplots of PULSE1 by TRT */ PROC SGPLOT DATA=BIO.PULSE_STEP2; VBOX PULSE1 / CATEGORY = TRT; RUN;