Dear R-users,

One can use the rcorr.cens function in Design to compute the C index when only 
the stop time is indicated (I think implicitely start=0 in that case). When the 
start and stop times are used in a Surv object, e.g. 

library(Design)
S=with(heart, Surv(start,stop,event))

the object returned is no longer a single number vector, so none of the 
following ways to compare a model fit to S makes sense:

rcorr.cens(-cph(S~ age+transplant+surgery, heart)$linear.predictors, 
with(heart, Surv(start,stop,event)))
#       C Index            Dxy           S.D.              n        missing 
#      4.95e-01      -9.66e-03       7.15e-02       1.72e+02       0.00e+00 
#this seems bad because it compares the fit to a different Surv than the one 
used to fit it (S, above)

rcorr.cens(-cph(S~ age+transplant+surgery, heart)$linear.predictors, 
with(heart, Surv(stop-start,event)))
#       C Index            Dxy           S.D.              n        missing 
#      6.02e-01       2.03e-01       7.54e-02       1.72e+02       0.00e+00 

Is there some way I can compute the correlation for this type of survival time 
specification in R? If not, does anybody have some tips on how to go about 
computing it myself?

Many Thanks

Eleni Rapsomaniki
Research Associate
Strangeways Research Laboratory
Department of Public Health and Primary Care
University of Cambridge
 

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to