/* 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; /* Paired T-Test using PROC TTEST and the PAIRED statement using the original pulse measurements - among only those who RAN */ PROC TTEST DATA = BIO.PULSE_STEP6 ; WHERE TRT=1; /* Selects the current group - those who RAN */ PAIRED PULSE2*PULSE1 ; /* Think of * as subtraction - strange but true*/ RUN; /* We can also base the test on the differences we calculated */ /* One-Sample T-Test using PROC TTEST for the differences we calculated - among only those who RAN*/ /* The H0 option gives the hypothesized value from the Null Hypothesis */ /* Similar code can be used for one-sample t-test */ PROC TTEST DATA = BIO.PULSE_STEP6 H0=0; WHERE TRT=1; /* Selects the current group - those who RAN */ VAR DIFF_2v1 ; RUN; /* One-Sample T-Test using PROC UNIVARIATE for the differences we calculated - among only those who RAN*/ /* The MU0 option gives the hypothesized value from the Null Hypothesis */ /* Similar code can be used for one-sample t-test */ /* This code automatically gives the results for the Sign test and the Wilcoxon Signed-Rank test. */ PROC UNIVARIATE DATA = BIO.PULSE_STEP6 MU0=0 CIBASIC; WHERE TRT=1; /* Selects the current group - those who RAN */ VAR DIFF_2v1 ; QQPLOT / NORMAL(MU=EST SIGMA=EST) ; RUN; /* Calculate the numeric summaries of the differences for those who ran */ PROC MEANS DATA = BIO.PULSE_STEP6 N MEAN STD CLM; WHERE TRT=1; VAR DIFF_2v1 ; RUN; PROC MEANS DATA = BIO.PULSE_STEP6 MIN Q1 MEDIAN Q3 MAX; WHERE TRT=1; VAR DIFF_2v1 ; RUN; PROC SGPLOT DATA=BIO.PULSE_STEP6; WHERE TRT=1; VBOX DIFF_2V1 / CATEGORY = TRT; RUN;