Post Hoc Comparisons in PROC GLM for analysis of covariance

Reply
N/A
Posts: 0

Post Hoc Comparisons in PROC GLM for analysis of covariance

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!
SAS Employee
Posts: 5

Re: Post Hoc Comparisons in PROC GLM for analysis of covariance

Hello,

Since this posting is specific to PROC GLM usage, I'd recommend that you post it to the SAS Procedures Discussion Forum: http://support.sas.com/forums/forum.jspa?forumID=32

If you are having issues with PROC GLM, you might also consider opening a SAS Technical Support track to resolve the issue. You can use the following online form to do so: http://support.sas.com/ctx/supportform/index.jsp

Regards,
Ron
Ask a Question
Discussion stats
  • 1 reply
  • 159 views
  • 0 likes
  • 2 in conversation