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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS Training: Just a Click Away

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

Browse our catalog!

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