R coxph() warning: Loglik converged before variableR coxph() warning: Loglik converged before variable - valid results for other variables?coxph() X matrix deemed to be singular;Survival analysis: extensions of coxphMultiple inputs for coxphcoxph : “**Error in if (any(infs)) warning(paste(”Loglik converged before variable “, : missing value where TRUE/FALSE needed”**coxph in R: Error in if (any(infs)) warning(paste(“Loglik converged before variable ”How to adjusts variables in coxph (R)?R Coxph() warning message and unexpected resultscoxph in R, beta affected by value of factor?add quantile to coxph function in RR coxph() warning: Loglik converged before variable - valid results for other variables?
Self-deportation of American Citizens from US
Why did some Apollo missions carry a grenade launcher?
Anti-cheating: should there be a limit to a number of toilet breaks per game per player?
How did the SysRq key get onto modern keyboards if it's rarely used?
Nuclear breeder/reactor plant controlled by two A.I. makes too much power
Is SecureRandom.ints() secure?
Classic vs Modern Experience
Is there any app for reduce battery draining for ios 12?
Why does Canada require bilingualism in a lot of federal government posts?
Why tantalum for the Hayabusa bullets?
Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?
How to improve king safety
Struggling with cyclical dependencies in unit tests
Filter search results by multiple filters in one operation
Is The Venice Syndrome documentary cover photo real?
My employer is refusing to give me the pay that was advertised after an internal job move
Why did House of Representatives need to condemn Trumps Tweets?
GNU sort stable sort when sort does not know sort order
Is it okay for me to decline a project on ethical grounds?
Is it safe if the neutral lead is exposed and disconnected?
Surviving a planet collision?
How long does it take for electricity to be considered OFF by general appliances?
Why were contact sensors put on three of the Lunar Module's four legs? Did they ever bend and stick out sideways?
Problem with Eigenvectors
R coxph() warning: Loglik converged before variable
R coxph() warning: Loglik converged before variable - valid results for other variables?coxph() X matrix deemed to be singular;Survival analysis: extensions of coxphMultiple inputs for coxphcoxph : “**Error in if (any(infs)) warning(paste(”Loglik converged before variable “, : missing value where TRUE/FALSE needed”**coxph in R: Error in if (any(infs)) warning(paste(“Loglik converged before variable ”How to adjusts variables in coxph (R)?R Coxph() warning message and unexpected resultscoxph in R, beta affected by value of factor?add quantile to coxph function in RR coxph() warning: Loglik converged before variable - valid results for other variables?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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?
Here's the code and the output:
> 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
Thank you
r survival-analysis categorical-data cox-regression
add a comment |
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?
Here's the code and the output:
> 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
Thank you
r survival-analysis categorical-data cox-regression
add a comment |
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?
Here's the code and the output:
> 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
Thank you
r survival-analysis categorical-data cox-regression
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?
Here's the code and the output:
> 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
Thank you
r survival-analysis categorical-data cox-regression
r survival-analysis categorical-data cox-regression
edited Oct 14 '13 at 21:50
JMarcelino
asked Oct 14 '13 at 21:07
JMarcelinoJMarcelino
3782 gold badges9 silver badges19 bronze badges
3782 gold badges9 silver badges19 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
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?
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19369314%2fr-coxph-warning-loglik-converged-before-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
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?
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
add a comment |
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
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?
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
add a comment |
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
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?
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
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?
edited Oct 15 '13 at 0:09
answered Oct 14 '13 at 22:15
42-42-
220k16 gold badges278 silver badges412 bronze badges
220k16 gold badges278 silver badges412 bronze badges
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
add a comment |
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
I've 31 events in 43. But I think you're right, I had messed up data.
– JMarcelino
Oct 23 '13 at 17:24
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
Link to answer of Terry Therneau (author of pkg:survival): stat.ethz.ch/pipermail/r-help/2008-September/174201.html
– vasili111
Mar 26 at 16:59
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19369314%2fr-coxph-warning-loglik-converged-before-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown