BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
darkwob
Calcite | Level 5

Hi All,

 

I am running a logistic regression model with mortality as the dependent variable (event of interest is "1", which equals mortality) and 3 treatments as the independent variable ("0" signifies the patient did not receive therapy, whereas "1" signifies the patient did receive therapy).

 

When running the model, SAS defaults to reporting the event of "0 vs 1" in the odds ratio plots (see below).

darkwob_4-1596455968131.png

 

darkwob_0-1596455733991.png

Code: 

proc logistic data=WORK.TOCI plots=(oddsratio(cldisplay=serifarrow) );
class Received_Hydroxychloroquine Received_Azithromycin Treatment / param=glm;
model Mortality(event='1')=Received_Hydroxychloroquine Received_Azithromycin
Treatment / link=logit technique=fisher;
run;

 

I would like to model this analysis based on "1 vs. 0", in other words the predictability of mortality if the patient received therapy. I adjusted the code by adding DESC, and the order seems to have reversed, but the odds ratio plot is still reporting "0 vs. 1" and the point estimates have not changed.

darkwob_3-1596455905843.png

 

darkwob_1-1596455861857.png

Code: 

proc logistic descending data=WORK.TOCI plots=(oddsratio(cldisplay=serifarrow) );
class Received_Hydroxychloroquine Received_Azithromycin Treatment / param=glm;
model Mortality(event='1')=Received_Hydroxychloroquine Received_Azithromycin
Treatment / link=logit technique=fisher;
run;

 

Is there any additional issue in the code of the program that is causing this to happen, or am I misinterpreting the results?

 

Thanks in advance,

Matt

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @darkwob and welcome to the SAS Support Communities!

 

The output says "Probability modeled is Mortality='1'" -- which is what you want and what you requested with the option event='1' in the MODEL statement. So, the descending option in the PROC LOGISTIC statement is basically redundant. Instead, add the descending option of the CLASS statement to turn the odds ratios of the dichotomous CLASS variables around.

class Received_Hydroxychloroquine Received_Azithromycin Treatment / param=glm descending;

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hi @darkwob and welcome to the SAS Support Communities!

 

The output says "Probability modeled is Mortality='1'" -- which is what you want and what you requested with the option event='1' in the MODEL statement. So, the descending option in the PROC LOGISTIC statement is basically redundant. Instead, add the descending option of the CLASS statement to turn the odds ratios of the dichotomous CLASS variables around.

class Received_Hydroxychloroquine Received_Azithromycin Treatment / param=glm descending;
darkwob
Calcite | Level 5
Great, this solved the issue, much appreciated!
SteveDenham
Jade | Level 19

Response removed by author

 

(Because it was wrong, basically)

 

SteveDenham

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 3 replies
  • 4186 views
  • 1 like
  • 3 in conversation