Logistic回归
Logistic回归
一、二分类 Logistic 回归(结局为二分类变量,采用二分类 Logistic 回归)
SPSS:Analyze-Regression-Binary Logistic
1、填写变量
Dependent(应变量)添加结局变量(一般为分组:0 为对照组,1 为结局组)。
Covariates(自变量)添加需要分析的相关因素(连续性变量、分类变量均可),包括age、gender、BMI 等。
Method(方法)有 7 种,各种方法之间的差别在于变量筛选方法不同,得出的结果也略有不同。
- 其中 Forward: LR 法(基于最大似然估计的向前逐步回归法)的结果相对可靠,但 Method 的选择无要求,可任意选择。
2、参数设定
①Options
Statistics and Plots 勾选 CI for exp(B): 95%,通常情况下均要求为 95%CI。
- CI for exp(B): 95% 展示 OR值的 95% CI。
Display 勾选 At last step 选项。
- At last step 仅展示最终结果。
- At each step 展示每个变量进入和退出的结果,一般不选择。
②Save
Predicted Values 勾选 Probabilities。此选项结果是为绘制ROC曲线作准备,不绘制ROC曲线则无需勾选。
- SPSS中会新增一个变量“PRE_1”
3、结果解读
Variables in the Equation 中列出了有意义的自变量及其参数,而 Variables not in the Equation 中列出了被排除的自变量。
我们最关注的结果为:Sig.表示 P值,Exp(B)表示 OR 值,95% CI for EXP (B) 表示 95%CI。
- OR值的计算公式为 Exp(B) = e^β(e是自然常数,β为表中的 B) 。
- 对于分类变量,OR值的含义为:相对于赋值较低的研究对象(例如,gender 0 = 女性),赋值较高的研究对象(gender 1 = 男性)出现结局的风险是多少倍。
- 对于连续变量,OR值的含义为:自变量每增加一个单位(例如,年龄每增加 1 岁)发生结局的风险增加的倍数。
二、ROC曲线绘制
Analyze-ROC curve
1、填写变量
Test Variable 添加之前新生成的变量“Predicted probability[PRE_1]”。
State Variable 添加结局变量(一般为分组:0 为对照组,1 为结局组),Value of Sta Variable: 1。
2、参数设定
Display 全部勾选。
- ROC Curve 展示 ROC曲线,With diagonal reference line 会绘制一条对角线;
- Standard error and confidence interval 展示统计结果,不勾选时仅有 AUC 值;
- Coordinate points of the ROC Curve 展示点坐标值,用于寻找 Cut-off 值。
3、结果解读
Area Under the Curve 中列出了 AUC(area under ROC,ROC曲线下的面积)。
Area Under the Curve 中(当勾选 Standard error and confidence interval 时),Asymptotic Sig.表示 P值,Asymptotic 95% Confidence Interval 表示 95%CI。
三、Cut-off 值[1]
ROC 曲线可用来寻找 Cut-off 值,即最接近左上角(0,1)的点所对应的坐标点。
1、填写变量
Test Variable 添加需要寻找 Cut-off 值的变量(如 Age),其他同上。
2、点坐标值
当勾选 Coordinate points of the ROC Curve 时,结果的 Coordinates of the Curve 列出了 ROC 曲线上的点坐标值
- Positive if Greater Than or Equal To 表示变量的值。
- Sensitivity 表示纵坐标。
- 1-Specificity 表示横坐标。
举例:
Positive if Greater Than or Equal To = 31.5,Sensitivity = 0.954,1-Specificity = 0.902。当 Age ≥ 31.5,认为其发生结局的灵敏度为 95.4%,特异度为 9.8%(1-0.902)。
2、正确指数
根据正确指数最大选出最佳临界点。
- 正确指数,又称约登指数(Youden’s index),表示检验方法发现真正病人与非病人的总能力,是灵敏度与特异度之和减去1,即约登指数=灵敏度+特异度-1。
3、Excel 操作
将 Coordinate points of the ROC Curve 给出的点坐标值复制至 Excel。
在 Excel 中,约登指数 = Sensitivity - (1-Specificity) 。对相减的结果进行排序,可以得到正确指数的最大值,即最佳临界点。
- 最佳临界点的 Positive if Greater Than or Equal To 即为 Cut-off 值。
==============
参考文献
















































