R coxph()警告:Loglik在变量之前收敛

时间:2013-10-14 21:07:15

标签: r survival-analysis categorical-data cox-regression

我在使用coxph()时遇到了一些麻烦。 我有两个分类变量:性别和可能原因,我想用作预测变量。性只是典型的男性/女性,但可能的原因有5种选择。 我不知道警告信息有什么问题。为什么cofidence间隔从0到Inf并且p值如此之高?

这是代码和输出:

> my_coxph <- coxph(Surv(tempo,status) ~ factor(Sexo)+ factor(Causa.provavel) ,           data=ceabn)
Warning message:
In fitter(X, Y, strats, offset, init, control, weights = weights,  :
Loglik converged before variable  2,3,5,6 ; beta may be infinite. 

> summary(my_coxph)
Call:
coxph(formula = Surv(tempo, status) ~ factor(Sexo) + factor(Causa.provavel), 
data = ceabn)

n= 43, number of events= 31 

                                            coef exp(coef)  se(coef)     z Pr(>|z|)
factor(Sexo)macho                      7.254e-01 2.066e+00 4.873e-01 1.488    0.137
factor(Causa.provavel)caca             2.186e+01 3.107e+09 9.698e+03 0.002    0.998
factor(Causa.provavel)colisao linha MT 1.973e+01 3.703e+08 9.698e+03 0.002    0.998
factor(Causa.provavel)indeterminado    9.407e-01 2.562e+00 1.683e+04 0.000    1.000
factor(Causa.provavel)predacao         2.170e+01 2.655e+09 9.698e+03 0.002    0.998
factor(Causa.provavel)predado          2.276e+01 7.659e+09 9.698e+03 0.002    0.998

                                       exp(coef) exp(-coef) lower .95 upper .95
factor(Sexo)macho                      2.065e+00  4.841e-01    0.7947     5.368
factor(Causa.provavel)caca             3.107e+09  3.219e-10    0.0000       Inf
factor(Causa.provavel)colisao linha MT 3.703e+08  2.701e-09    0.0000       Inf
factor(Causa.provavel)indeterminado    2.562e+00  3.904e-01    0.0000       Inf
factor(Causa.provavel)predacao         2.655e+09  3.766e-10    0.0000       Inf
factor(Causa.provavel)predado          7.659e+09  1.306e-10    0.0000       Inf

Concordance= 0.752  (se = 0.059 )
Rsquare= 0.608   (max possible= 0.987 )
Likelihood ratio test= 40.23  on 6 df,   p=4.105e-07
Wald test            = 7.46  on 6 df,   p=0.2807
Score (logrank) test = 30.48  on 6 df,   p=3.183e-05

谢谢

1 个答案:

答案 0 :(得分:13)

几年前,当我问Terry Therneau(pkg:survival的作者)时,他说正在触发产生该警告的测试过于敏感。通常警告不正确。您通常只需查看系数即可看出它们不是无限的

但是,在您的情况下,似乎正确地警告您数据可能存在问题,因为您的系数难以置信。在指数模型中,β系数为2.276e + 01(= 22.7),这个数字非常高。估计相对风险超过一百万!您应该查看数据的表格分类,以了解完全分离的问题。你的任何一个控制组都死了,呃,有没有事件?