Programming the statistical procedures from SAS

proc logistic: comparison

Accepted Solution Solved
Reply
Contributor L_L
Contributor
Posts: 56
Accepted Solution

proc logistic: comparison

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


Accepted Solutions
Solution
‎03-13-2012 09:43 AM
Grand Advisor
Posts: 16,908

proc logistic: comparison

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


All Replies
Solution
‎03-13-2012 09:43 AM
Grand Advisor
Posts: 16,908

proc logistic: comparison

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;

Contributor L_L
Contributor
Posts: 56

proc logistic: comparison

Thank you very much!!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 104 views
  • 0 likes
  • 2 in conversation