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
mayafh
Calcite | Level 5

Thank you so much! That worked

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

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
  • 1696 views
  • 3 likes
  • 2 in conversation