[R] changes in coxph in "survival" from older version?

Shi, Tao shidaxia at yahoo.com
Thu May 12 01:11:12 CEST 2011


Hi all,

I found that the two different versions of "survival" packages, namely 2.36-5 
vs. 2.36-8 or later, give different results for coxph function.  Please see 
below and the data is attached.  The second one was done on Linux, but Windows 
gave the same results.  Could you please let me know which one I should trust?

Thanks,

...Tao





#####============================ R2.13.0, survival 2.36-9 
=================================
> dat=read.csv("tmp1.csv", header=T)
> fit2 <- coxph(Surv(tt, cens) ~., data=dat)
Warning message:
In fitter(X, Y, strats, offset, init, control, weights = weights,  :
  Ran out of iterations and did not converge
> summary(fit2)
## the estimates are different
.....
> sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United 
States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    


attached base packages:
[1] grDevices datasets  splines   graphics  stats     tcltk     utils     
methods   base     


other attached packages:
[1] svSocket_0.9-51 TinnR_1.0.3     R2HTML_2.2      Hmisc_3.8-3     
survival_2.36-9

loaded via a namespace (and not attached):
[1] cluster_1.13.3  grid_2.13.0     lattice_0.19-23 svMisc_0.9-61   
tools_2.13.0  

#####============================================ 
=================================


#####============================ R2.12.2, survival 2.36-5 
=================================
> dat=read.csv("tmp1.csv", header=T)
> fit2 <- coxph(Surv(tt, cens) ~., data=dat)
> summary(fit2)
## the estimates are different
.....
> 
> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] survival_2.36-5
#####============================================ 
=================================


More information about the R-help mailing list