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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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