BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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!
1 REPLY 1
RonStatt_SAS
SAS Employee
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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 473 views
  • 0 likes
  • 2 in conversation