How does one get PROC GLM to report post hoc comparisons among means in an Analysis of Covariance rather than an Analysis of Variance setup?
In PROC GLM, one can ask for post hoc comparisons among means and get a convenient display of ordered means showing which pairs are significantly different:
proc glm data=indz;
class school;
model meanZ=school yrstopublish ;
lsmeans school ;
means school / lsd opt=lines;
run;
Here, lsd is one type of post hoc comparison test, and opt=lines creates a compact graph showing which ordered means differ significantly.
Unfortunately, one can't ask for / lsd opt = lines in the lsmeans statement rather than the means statement. Therefore, the post hoc tests use an error term that ignores the information in the covariate, giving the same output as if the model had omitted the covariate yrstopublish:
proc glm data=indz;
class school;
model meanZ=school ;
lsmeans school ;
means school / lsd opt=lines;
run;
Thanks!