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

I am trying to teach myself to run a logistic regression result with restricted cubic splines.  I found great information here and was able to build a SAS code.   I am using heart.csv from 

https://support.sas.com/documentation/onlinedoc/viya/examples.htm   I got the odds ratios but not sure how to interpret them.  I didn't set the reference, so I am not sure what the reference for these odds ratios was.   Is it possible to change the reference?

 
data heart1;
set heart;
 
if status = "Alive" then Death = 0;
else if status = "Dead" then Death = 1;
 
run;
 
proc logistic data=heart1; 
effect spl = spline(cholesterol / details naturalcubic basis=tpf(noint)                 
               knotmethod=percentilelist(10 50 90));  
model Death (event='1')= spl  / selection=none covb OUTROC=ROCDATA rocci;  
oddsratio cholesterol / at(cholesterol=174 223 285)
                  diff=ref cl=pl;
run;
Screenshot.png
1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

The estimated odds ratios are the 1-unit changes in odds starting at each of the values you specified in the AT option. That is, the first estimate, 1.010, is the change in odds from 174 to 175. If what you want are the changes for more than 1 unit, then use the UNITS statement in addition to the ODDSRATIO statement. 

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

The estimated odds ratios are the 1-unit changes in odds starting at each of the values you specified in the AT option. That is, the first estimate, 1.010, is the change in odds from 174 to 175. If what you want are the changes for more than 1 unit, then use the UNITS statement in addition to the ODDSRATIO statement. 

J_Park
Obsidian | Level 7
May I get a reference for this?  I need to explain this to my colleagues, and it would be great to have a reference.  Thank you!
StatDave
SAS Super FREQ

This is covered in "Odds Ratio Estimation" in the Details section of the PROC LOGISTIC documentation.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 4 replies
  • 702 views
  • 1 like
  • 2 in conversation