BookmarkSubscribeRSS Feed
jjjjvvvv0000
Calcite | Level 5

This should be a very simple question, but I cannot seem to figure out how to do it.

I ran the crude ORs for each variable to assess the odds that persons would get tested for X disease at one clinic site vs. another (i.e., there is no reference group since I am comparing male who got tested at one clinic to males who got tested at another, females who got tested at one clinic vs. another, etc.). The table we put together looks like:

Male: OR = 2.0 (95% CI: 1.5-2.5)

Female: OR 2.5 (95% CI: 1.8-.3.3)

Asian: OR 2.1 (95% CI: 1.4-2.7)

Black: OR 3.0 (95% CI: 1.0-5.0),

.....

etc.

 

I would like to adjust these ORs by age (as a categorical variable), but when I run the code, I cannot figure out how to get ORs for each of the covariates listed above and not just the overall aOR. What I want is an output that shows all the adjusted ORs when adjusting for age among all of the covariates (as shown above: sex, race, etc.).

 

Below is the code I'm currently using. I assume I need to add in a BY or SLICE statement, but both of those strategies don't seem correct:

 

proc logistic data=disease;
class Clinic (Ref = 'A') Sex Race / param=glm;
model Disease (event = "Yes") = Clinic;
oddsratio Clinic;
run;

 

Thanks.

2 REPLIES 2
Mike_N
SAS Employee

I might not be completely understanding your question. What I gather is you want to report, separately for sex, race, clinic, etc., age-adjusted odds ratios of disease. In that case, you need to include age in your model statement, e.g., 

model Disease (event = "Yes") = sex age;

 If age is a categorical measure, you also need to include age in your class statement.   

StatDave
SAS Super FREQ

Since you want the clinic odds ratio for each sex and for each race, I assume that you want to allow for the clinic odds ratio to change in each sex and each race.  If so, then you model needs to accommodate that. You could then just use the ODDSRATIO statement to get the clinic odds ratios for each combination of sex and race. But you seem to want them for sex alone and for race alone. To do that you have to be comfortable averaging over the other variable (that is, over race for the odds ratios for sex). You can do that using the SLICE statement. For example, using C, S, R for Clinic, Sex, and Race:

proc logistic plots=none;
class c s r / param=glm;
model disease(event='Yes')=c c*s c*r;
oddsratio c;
slice c*s / sliceby=s diff oddsratio cl;
slice c*r / sliceby=r diff oddsratio cl;
run;

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!

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
  • 2 replies
  • 641 views
  • 4 likes
  • 3 in conversation