What you are asking for might not be done in PROC GLM --- In some other procedures that can also fit your ANOVA model, like PROC MIXED or PROC GENMOD, you might use the LSMESTIMATE statement with the ADJUST= option to get what you want; or use the ESTIMATE statement with the ADJUST=BON in procedures like PROC GLIMMIX or PROC GENMOD to get what you want. But PROC GLM does not have the LSMESTIMATE statement, and for the ESTIMATE statement in PROC GLM, ADJUST= option is not supported. Below is a sample syntax --
proc mixed data=yourdata;
class A;
model y=A;
lsmestimate A 'level 1 vs 2' 1 -1 0 0 0 0,
'level 3 vs 5' 0 0 1 0 -1 0, ,
'level 1 vs 6' 1 0 0 0 0 -1/adjust=bon; ,
run;
Another approach if you prefer fitting your model in PROC GLM, is to use the STORE statement in PROC GLM then use PROC PLM to do the multiple comparisons you want. For example,
proc glm data=yourdata;
class A;
model y=A;
store glmout;
run;
proc plm restore=glmout;
lsmestimate A 'level 1 vs 2' 1 -1 0 0 0 0,
'level 3 vs 5' 0 0 1 0 -1 0, ,
'level 1 vs 6' 1 0 0 0 0 -1/adjust=bon; ,
run;
... View more