BookmarkSubscribeRSS Feed
iressa1313
Calcite | Level 5

Hello, how do I simply stratify analysis by gender? My outcome variable is continuous and I have a mix of continuous and categorical predictors. I used proc glm for the whole group analysis. I thought to create a new data set for each gender and then run the analyses but I was wondering if SAS has a simpler way to accomplish this. Thanks for any help!

 

 

proc glm data= dummy;
model loglac= mddtotal age sex;
run;

 

1 REPLY 1
PaigeMiller
Diamond | Level 26
proc glm data= dummy;
class sex;
model loglac= mddtotal age sex;
run;

I'm not 100% sure I know what you mean by "stratify" in the context of GLM modeling, but you can add SEX into the CLASS statement; you can also include interactions of SEX with AGE and MDDTOTAL, this effectively computes different intercepts and different slopes for AGE and MDDTOTAL depending on the value of SEX.

--
Paige Miller

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 lock in 2025 pricing—just $495!

Register now

SAS Training: Just a Click Away

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

Browse our catalog!

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