Reputation: 147
I have a set of data where I would like to do logistic regression modeling the odds of a binary outcome variable (Therapy), with Stage as an ordinal explanatory variable (0,1,2,3,4). Hba1c is a continuous variable.
Is my class statement correct?
How do I get it to calculate the odds ratios for each level of the ordinal variable?
PROC LOGISTIC data=new;
class EyeID Therapy (ref ="0") Stage (param = ordinal) Gender (ref="M") Ethnicity (ref="C")/ param = ref;
model Therapy = Stage Gender age A1c Ethnicity;
oddsratio Stage;
run;
This is the Output:
Odds Ratio Estimates and Wald Confidence Intervals
Odds Ratio Estimate 95% Confidence Limits
Stage 1 vs 0 0.873 0.547 1.394
Stage 2 vs 0 2.434 0.895 6.620
Stage 3 vs 0 0.915 0.431 1.941
Stage 4 vs 0 0.356 0.132 0.961
Stage 2 vs 1 2.788 0.980 7.935
Stage 3 vs 1 1.048 0.465 2.360
Stage 4 vs 1 0.408 0.144 1.156
Stage 3 vs 2 0.376 0.113 1.249
Stage 4 vs 2 0.146 0.038 0.567
Stage 4 vs 3 0.389 0.117 1.288
If I am reporting Stage as an ordinal variable, then is it correct that I create a table like this?
Stage 1 vs 0 0.873 0.547 1.394
Stage 2 vs 1 2.788 0.98 7.935
Stage 3 vs 2 0.376 0.113 1.249
Stage 4 vs 3 0.389 0.117 1.288
I should not report it like this, correct? This is if stage was categorical?
Stage 1 vs 0 0.873 0.547 1.394
Stage 2 vs 0 2.434 0.895 6.62
Stage 3 vs 0 0.915 0.431 1.941
Stage 4 vs 0 0.356 0.132 0.961
Upvotes: 1
Views: 841
Reputation: 12465
I do not think you need Therapy
on the class statement.
Without sample data, I cannot test this, but my first pass would have been to write it like this.
proc logistic data=test;
class PVDStage (param = ordinal);
model Therapy(ref = '0') = PVDStage hba1c;
ODDSRATIO PVDStage;
run;
If you can provide some sample data, I will amend my answer to ensure it works.
Upvotes: 1