C-index for models fitted using start, stop in Surv?
rcorr.cens is not meant for that.
Thank you for the clarification. On a second thought, I think (hope) a time-dependent AUC index should be more appropriate in this case, such as survivalROC. Many many thanks for all your help! Eleni Rapsomaniki Research Associate Tel: +44 (0) 1223 740273 Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge -----Original Message----- From: Frank E Harrell Jr [mailto:f.harrell at vanderbilt.edu] Sent: 25 February 2009 17:50 To: Eleni Rapsomaniki Cc: r-help at r-project.org Subject: Re: [R] C-index for models fitted using start, stop in Surv?
Eleni Rapsomaniki wrote:
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
rcorr.cens is not meant for that. Frank
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt
University