/* 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";
VALUE BMI_TWO 1 = "< 25"
2 = "25+";
VALUE BMI_FOUR 1 = "< 18.5"
2 = "[18.5, 25)"
3 = "[25, 30)"
4 = "30+";
VALUE WT_TWO 1 = "87kg or Below"
2 = "More than 87kg";
VALUE WT_FOUR 1 = "55kg or Below "
2 = "(55kg, 60kg]"
3 = "(60kg, 67kg]"
4 = "(67kg, 79kg]"
5 = "More than 79kg";
RUN;
/* PROC GLM can be used for One-way ANOVA (Analysis of Variance) */
/* This procedure can also perform more complex ANOVA models */
PROC GLM DATA=BIO.PULSE_STEP5;
CLASS WTGROUPS; /* Categorical Explanatory Variable */
/* MODEL statement is MODEL Y = X */
/* The quantitative response is on the left of the equals */
/* The categorical explanatory variable is on the right */
MODEL HEIGHT = WTGROUPS;
LSMEANS WTGROUPS / adjust= TUKEY ;
LSMEANS WTGROUPS / adjust= BON ;
RUN;
QUIT;
/* Numeric Summaries of HEIGHT by WTGROUPS */
/* We add the CLM option for confidence intervals for the mean in each group */
PROC MEANS DATA = BIO.PULSE_STEP6 N MEAN STD CLM;
CLASS WTGROUPS;
VAR HEIGHT;
RUN;
PROC MEANS DATA = BIO.PULSE_STEP6 MIN Q1 MEDIAN Q3 MAX;
CLASS WTGROUPS;
VAR HEIGHT;
RUN;
/* Side-by-side boxplots */
PROC SGPLOT DATA = BIO.PULSE_STEP6;
VBOX HEIGHT / CATEGORY = WTGROUPS;
RUN;
/* Next Analysis of AGE vs WTGROUPS*/
PROC GLM DATA=BIO.PULSE_STEP5;
CLASS WTGROUPS;
MODEL AGE = WTGROUPS;
LSMEANS WTGROUPS / adjust= TUKEY ;
LSMEANS WTGROUPS / adjust= BON ;
RUN;
QUIT;
/* Numeric Summaries of AGE by WTGROUPS */
/* We add the CLM option for confidence intervals for the mean in each group */
PROC MEANS DATA = BIO.PULSE_STEP6 N MEAN STD CLM;
CLASS WTGROUPS;
VAR AGE;
RUN;
PROC MEANS DATA = BIO.PULSE_STEP6 MIN Q1 MEDIAN Q3 MAX ;
CLASS WTGROUPS;
VAR AGE;
RUN;
/* Side-by-side boxplots */
PROC SGPLOT DATA = BIO.PULSE_STEP6;
VBOX AGE / CATEGORY = WTGROUPS;
RUN;