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-...

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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