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

Dear all

I'm using proc logistic to calculate odds ratio.

variable: ev =1 (success)  or 0

treatment: A, B, C.

I would like to calculate odds ratio to compare the odds for treatment A and B, treatment A and C, treatment B and C.

First I tried running three logistic as follow:

Proc logistic data=sample;

     where treatment in ('A' 'B');

     class treatment;

      model ev (EVENT='1')= treatmnet;

run;

and so on for the other odds.

Then I tried with:

proc logistic data=sample

class treatment;

model ev (EVENT='1')= treatmnet;

run;

But what I obtain is the odds ratio for only two comparison. I notice that the odds ratio and the confidence interval are the same in the two cases, but the  p-value is different.

What can I do to calculate all the odds ratio I need in the correct way?

Thank in advance for any answer

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Try using the oddsratio statement with the param=ref option.

You may have also spelled 'treatment' incorrectly?

proc logistic data=sample

class treatment/param=ref;

model ev (EVENT='1')= treatment;

oddsratio treatment;

run;

View solution in original post

2 REPLIES 2
Reeza
Super User

Try using the oddsratio statement with the param=ref option.

You may have also spelled 'treatment' incorrectly?

proc logistic data=sample

class treatment/param=ref;

model ev (EVENT='1')= treatment;

oddsratio treatment;

run;

L_L
Calcite | Level 5 L_L
Calcite | Level 5

Thank you very much!!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1392 views
  • 0 likes
  • 2 in conversation