Programming the statistical procedures from SAS

calculating stratum-specific ORs in logistic regression

Reply
Occasional Contributor
Posts: 13

calculating stratum-specific ORs in logistic regression

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

Regular Contributor
Posts: 152

Re: calculating stratum-specific ORs in logistic regression

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.

Ask a Question
Discussion stats
  • 1 reply
  • 178 views
  • 0 likes
  • 2 in conversation