资源描述
Logistic回归分析
二分类(因变量Y有(如发病1与未发病0)两种可能出现的结果)资料的Logistic回归分析,至于多分类Logistic回归分析,与二分类操作过程类似,只是在数据编制及分析方法选择处不同。
分析的一般步骤:
变量的编码
哑变量的设置和引入
各个自变量的单因素分析
变量的筛选
交互作用的引入
建立多个模型
选择较优的模型
模型应用条件的评价
输出结果的解释
实例操作
11.1 某研究人员在探讨肾细胞癌转移的有关临床病理因素研究中,收集了一批行根治性肾切除术患者的肾癌标本资料,现从中抽取26例资料作为示例进行logistic回归分析。
1.各变量及其赋值说明
x1:确诊时患者的年龄(岁)
x2:肾细胞癌血管内皮生长因子(VEGF),其阳性表述由低到高共3个等级(1-3)
x3:肾细胞癌组织内微血管数(MVC)
x4:肾癌细胞核组织学分级,由低到高共4级 (1-4)
x5:肾细胞癌分期,由低到高共4期 (1-4)
y:肾细胞癌转移情况(有转移y=1; 无转移y=0)。为二分类变量。
若作单因素的Logistic回归分析,也就是分别作Y与各自变量间的回归分析,如Y与X1、Y与X2等的单因素Logistic回归分析。
2.建立数据库
3.分析步骤
(1)
(2)
上图中若为单因素回归分析,只需在Covariates协变量框内导入单一自变量如X1即可。
(3)
4.分析结果
(1)数据描述
Case Processing Summary
Unweighted Casesa
N
Percent
Selected Cases
Included in Analysis
26
100.0
Missing Cases
0
.0
Total
26
100.0
Unselected Cases
0
.0
Total
26
100.0
a. If weight is in effect, see classification table for the total number of cases.
Dependent Variable Encoding
Original Value
Internal Value
无转移
0
转移
1
(2)Block 1: Method = Forward Stepwise (Likelihood Ratio)
Omnibus Tests of Model Coefficients
Chi-square
df
Sig.
Step 1
Step
15.538
1
.000
Block
15.538
1
.000
Model
15.538
1
.000
Step 2
Step
6.178
1
.013
Block
21.716
2
.000
Model
21.716
2
.000
表示两步变量的引入均有统计学意义,方法合理。
Model Summary
Step
-2 Log likelihood
Cox & Snell R Square
Nagelkerke R Square
1
18.004a
.450
.621
2
11.826b
.566
.781
a. Estimation terminated at iteration number 6 because parameter estimates changed by less than .001.
b. Estimation terminated at iteration number 7 because parameter estimates changed by less than .001.
可见第二步比第一步变量引入后决定系数有所增加,表明第二步变量引入后模型的拟合效果更好。
(3)
Classification Tablea
Observed
Predicted
肾细胞癌转移情况
Percentage Correct
无转移
转移
Step 1
肾细胞癌转移情况
无转移
15
2
88.2
转移
2
7
77.8
Overall Percentage
84.6
Step 2
肾细胞癌转移情况
无转移
16
1
94.1
转移
0
9
100.0
Overall Percentage
96.2
a. The cut value is .500
Variables in the Equation
B
S.E.
Wald
df
Sig.
Exp(B)
95% C.I.for EXP(B)
Lower
Upper
Step 1a
X2
2.563
.916
7.829
1
.005
12.978
2.155
78.154
Constant
-6.256
2.289
7.468
1
.006
.002
Step 2b
X2
2.413
1.196
4.072
1
.044
11.172
1.072
116.454
X4
2.096
1.088
3.713
1
.054
8.136
.965
68.623
Constant
-12.328
5.431
5.154
1
.023
.000
a. Variable(s) entered on step 1: X2.
b. Variable(s) entered on step 2: X4.
模型最后引入X2(肾细胞癌血管内皮生长因子(VEGF))和X4(肾癌细胞核组织学分级)两个变量,虽然X4引入后的参数检验显示P=0.54>0.05且其OR值的95%CI中包括1,但是考虑到其OR=8.136较大,且由上一表可知引入变量X4后,用模型进行预测时的Percentage Correct从84.6%提高到96.2%,因此综合考虑后还是应将变量X4引入模型。
(4)
Variables not in the Equation
Score
df
Sig.
Step 1
Variables
X1
.806
1
.369
X3
.188
1
.664
X4
6.199
1
.013
X5
3.689
1
.055
Overall Statistics
8.876
4
.064
Step 2
Variables
X1
1.398
1
.237
X3
.726
1
.394
X5
1.662
1
.197
Overall Statistics
5.097
3
.165
可见当其他变量引入模型后的参数检验均无统计学意义。
(5)
由以上第一步和第二步的预测判别结果可见,在(Predicted Probability is of Membership for 转移 The Cut Value is .50)中,经第二步后,预测判别发生错误的例数在转移和非转移中均有下降,由此也可以得知引入变量X4是正确且必要的,同上面得出的结论是一致的。
展开阅读全文