BookmarkSubscribeRSS Feed
Sathish_jammy
Lapis Lazuli | Level 10

Hi,

 

I need to evaluate the Odds Ratio and Confidence Interval for Numeric variables,

data have;
input ID Age BMI;
cards;
813281 47.2 26.81359045
813283 50 20.9839876
813341 46.8 25.21625331
813456 58.5 27.11058264
817845 56.8 24.8357635
818038 45.1 28.72678773
818454 42.1 24.50894577
;
run;

I Tried like 

proc reg data = have PLOTS(MAXPOINTS=15000);
model age = BMI;
output out = get 
p = Predict1 
r = residal;
run;

proc logistic data=have;
model age = BMI / expb;
run;

I gone with logistic regression,

But we should use logistic regression when the dependent variable is binary (0/ 1, True/ False, Yes/ No) in nature. Here the values not in range. (so Logistic won't work to get the right values)

 

Could anyone please let me know how to get odd ratio and Confidence Intervals.

Thanks in advance!

 

1 REPLY 1
rbikes
Obsidian | Level 7

Yes as you said to follow the Odds Ratio approach you need to create a binary variable.

 

 

 

data have2;
	set have;
	obese = (read>=30);
run;



proc logistic data = have2;
model obese = age ;
run ;

 But I highly recommend you review the following:

 

https://stats.idre.ucla.edu/sas/dae/logit-regression/

https://stats.idre.ucla.edu/sas/faq/in-proc-logistic-why-arent-the-coefficients-consistent-with-the-...

 

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 940 views
  • 0 likes
  • 2 in conversation