Skip to content

coxph: no convergence with completely tied data with 'exact'-method

1 message · Johannes Hengelbrock

#
Dear users,

I'm trying to estimate a conditional logistic model using the 
coxph()-function from the survival package. Somehow, the model does not 
converge if time is set to the same value for all observations:

     library(survival)
     set.seed(12345)
     n <- 3000
     a <- rbinom(n, 1, 0.5)
     b <- rbinom(n, 1, 0.5)
     coxph(formula = Surv(rep(1, 3000), a) ~ b, method = "exact")

Error in fitter(X, Y, strats, offset, init, control, weights = weights, 
: NA/NaN/Inf in foreign function call (arg 5) In addition: Warning 
message: In fitter(X, Y, strats, offset, init, control, weights = 
weights, :Ran out of iterations and did not converge

Changing iter.max does not help, aparently. Strangely, the exact same 
model converges in SAS.

I know that I could estimate the model differently (via glm), but I 
would like to understand why the model does converge in SAS but not in R.

Thanks,
Johannes