BookmarkSubscribeRSS Feed
joebaker7
Calcite | Level 5

Hi,

If I have the following model:

proc logistic data=joe.extra2 order=formatted;

class tt (ref='<=2')/param=ref;

class race (ref='white')/param=ref;

class clinic (ref='austin')/param=ref;

class sex (ref='female')/param=ref;

model a1ctri=tt race age clinic ;

strata sex;

where  sex ne . and race ne . and clinic ne . and age ne . and bmi ne . and smokingnew ne . and htn ne . and depression ne .

and dyslipidemia ne . and language ne . and insurance ne . and med ne . and visits ne . and years ne .;

format a1ctri a1ctri. tt tt. med med. sex sex. race race. clinic clinic. insurance insurance.

htn htn. dyslipidemia dyslipidemia. depression depression.;

run;

and I want to get stratified results by SEX, with an odds ratio for each, how do I do it?  Just by specifying in the 'where' statement that sex=0?

Thanks

1 REPLY 1
1zmm
Quartz | Level 8

Use PROC SORT to sort by sex.  Then insert a   BY sex; statement in your PROC LOGISTIC code.  Be sure to drop the STRATA statement because that has a different purpose.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 2394 views
  • 0 likes
  • 2 in conversation