5
我在使用coxph()時遇到了一些麻煩。 我有兩個分類變量:性別和可能原因,我想用作預測變量。性別只是典型的男性/女性,但可能的原因有5個選項。 我不知道警告消息有什麼問題。爲什麼cofidence間隔從0到Inf並且p值如此之高?R coxph()警告:Loglik在變量前收斂
下面的代碼和輸出:
> 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
謝謝
我在43個31個事件。但我認爲你是對的,我搞砸了數據。 – JMarcelino