[R] coxph: no convergence with completely tied data with 'exact'-method
Johannes Hengelbrock
j.hengelbrock at uke.de
Thu Jun 2 11:46:29 CEST 2016
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]]
More information about the R-help
mailing list