R coxph()警告:Loglik在变量前收敛 [英] R coxph() warning: Loglik converged before variable

查看:2139
本文介绍了R coxph()警告:Loglik在变量前收敛的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm having some trouble using coxph(). I've two categorical variables: Sex and Probable Cause, that I want to use as predictor variables. Sex is just the typical male/female but Probable Cause has 5 options. I don't know what is the problem with the warning message. Why does the cofidence intervals are from 0 to Inf and the p-values so high?

以下是代码和输出:

> 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

谢谢

推荐答案

几年前,当我问Terry Therneau(pkg:survival的作者)关于那件事时,他说被触发以生成该警告的测试是过度敏感。通常,警告不正确。通常,您可以只查看系数来确定它们不是无限的

When I asked Terry Therneau (author of pkg:survival) about that several years ago he said the test that is being triggered to generate that warning is overly sensitive. Generally the warning is not correct. You can usually just look at your coefficients to see that they are not infinite

但是,对于您来说,这似乎是在正确警告您您的问题可能存在数据,因为您的系数实在太大。在指数模型中,β系数为2.276e + 01(= 22.7)实在太高了。估计相对风险超过一百万!您应该查看数据的表格分类,以查找完全分离的问题。您的对照组中有人死了吗,一个事件?

In your case, however, it seems to be correctly warning you that there may be problems with your data, since you have implausibly large coefficients. A beta coefficient of 2.276e+01 (= 22.7) in an exponential model is just ridiculously high. The estimated relative risk is well over a million! You should be looking at tabular classifications of your data for problems of complete separation. Did any of your control group die, er, have an event?

这篇关于R coxph()警告:Loglik在变量前收敛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆