Sample SAS Code Implementation

Executing Multiple Comparison Testing via PROC GLM

The following program inputs clinical trial survival duration across 4 study groups and executes a one-way ANOVA followed by multiple post-hoc procedures in SAS:

/* Step 1: Input Group and Survival Data */ data Sample_PostHoctest; input group survival_in_months; datalines; 4 145 1 198 4 122 4 108 2 61 1 82 2 121 1 191 4 191 3 109 2 82 2 74 3 85 1 193 4 65 3 173 3 129 2 107 2 157 1 175 3 173 4 169 3 104 1 2 4 129 2 181 4 189 3 9 2 190 1 70 2 7 3 190 4 86 4 141 2 64 2 134 1 121 4 200 3 177 1 59 2 26 4 137 1 64 3 18 2 55 3 68 1 30 2 147 3 30 1 151 4 86 1 83 2 22 3 169 3 103 2 13 3 2 3 183 2 27 4 60 2 132 4 109 3 172 4 13 2 44 4 124 1 87 2 31 1 130 4 90 2 69 3 37 3 57 3 195 2 4 4 195 2 62 1 144 1 35 3 187 3 193 ; /* Step 2: Run ANOVA and Test Statistics via PROC GLM */ proc glm data=Sample_PostHoctest; class group; model survival_in_months = group; means group / lsd tukey bon duncan dunnett gabriel regwq scheffe sidak waller; run; quit;