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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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