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 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!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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