Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in aeqSurv(Y) : aeqSurv exception, an interval has effective length 0

I'm using R's coxph function to fit a survival regression model, and I'm trying to model time dependent covariates (see this vignette). When fitting the model, I get the following error:

Error in aeqSurv(Y) : aeqSurv exception, an interval has effective length 0

Other than the source code, I couldn't find any references to this error online. Would appreciate any ideas about how to handle this exception.

like image 306
Adam Haber Avatar asked Oct 30 '22 00:10

Adam Haber


1 Answers

I found the same error. Probably the cause is the aeqSurv routine that treats time values such that tiny differences are treated as a tie. This is actually useful and the error is potentially pointing an issue with the data.

However, if we need to force a solution you can use the coxph.options. Just setting timefix = FALSE in the call to coxph should make the trick!

Source: https://rdrr.io/cran/survival/src/R/aeqSurv.R

like image 77
Carlos S Traynor Avatar answered Nov 15 '22 05:11

Carlos S Traynor