Johannes Hengelbrock
2016-Jun-02 09:46 UTC
[R] coxph: no convergence with completely tied data with 'exact'-method
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 -- __________________________________________________________________ Johannes Hengelbrock Universit?tsklinikum Hamburg-Eppendorf Institut f. Medizinische Biometrie und Epidemiologie Martinistr. 52, 20246 Hamburg Tel. 040-7410-53517 / Fax: 040-7410-57790 mailto:j.hengelbrock at uke.de https://www.uke.de/kliniken-institute/institute/medizinische-biometrie-und-epidemiologie/team/index.html __________________________________________________________________ -- _____________________________________________________________________ Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard G?ke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Pr?l?, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING [[alternative HTML version deleted]]