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.
我有一组数据,我想对二元结果变量(治疗)的几率进行逻辑回归建模,其中Stage作为序数解释变量(0,1,2,3,4)。 Hba1c是一个连续变量。
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报告为序数变量,那么我创建这样的表是否正确?
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
1 个解决方案
#1
1
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.
如果您可以提供一些示例数据,我会修改我的答案以确保其有效。
#1
1
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.
如果您可以提供一些示例数据,我会修改我的答案以确保其有效。