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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 691 views
  • 0 likes
  • 2 in conversation