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!
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/
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.