BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lousam
Obsidian | Level 7

Hello,

 

I am currently working on a project where I want to see the OR of having a cardiac event for: underweight, overweight and obese bmi categories at each of the age values I listed in my code (ages 50 & 60). For some reason my code below only outputs the OR for age and bmicat individually and the OR for age at 50 and 60.  Is there something with my code? How can I get the output I want  for the odds ratio(listed below)? 

 

Code used:

proc logistic data=final;
class bmicat(ref="normal")/param=ref;
effect agespline=spline(age/naturalcubic);                                 *Wanted to allow for curvature by using spline;
model cardiac(event="yes")= agespline bmicat/ rsq ;

oddsratio age/at (age= 50 60);
oddsratio bmicat/at (age= 50 60);
run;

 

Output I am trying to get for the Odds Ratios:

underweight vs. normal at age=50 

overweight vs. normal at age= 50

obese vs. normal at age=50 

 

underweight vs. normal at age=60 

overweight vs. normal at age= 60

obese vs. normal at age=60 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Since there is no interaction between age and bmi in your model, the odds ratios between bmi levels do not depend on age.

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

Since there is no interaction between age and bmi in your model, the odds ratios between bmi levels do not depend on age.

PG

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
  • 1691 views
  • 1 like
  • 2 in conversation