BookmarkSubscribeRSS Feed
mayafh
Calcite | Level 5

Hello! I am looking for help repeating a procedure I completed some time ago.

 

I am looking to present the adjusted least squares means of a few variables. I would like to find the mean of var a by var b while controlling for var c, d, etc. I believe I used proc reg in the past, but I am not sure how to get lsmeans with proc reg. Any help is appreciated! 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Use PROC GLM. Not only does PROC GLM have the LSMEANS command, but you don't have to create dummy variables for your class variables like you would have to do with PROC REG.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 968 views
  • 3 likes
  • 2 in conversation