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