# [R] survfit on coxph object with weights

Nicholas Lewin-Koh nikko at hailmail.net
Thu Jul 18 05:47:09 CEST 2002

Hi,
I am working on a study where we need to predict individual survival
curves from a cox-model fit with sampling weights. In both R and Splus
the survfit.coxph code starts with

if(!is.null((object$call)$weights))
stop("Survfit cannot (yet) compute the result for a weighted model")

My question is does anyone have code to get the expected survival curve,
or even just the base cumulative hazard (H^{\hat}_{0}(t)) ?

I am surprised that it is not implemented yet since a formula is given
on page 35 of Dr. Therneau's report, "a package for survival analysis in
S" for the base cumulative hazard with weights. I am looking at the
source for survfit.coxph to see if I can fix it myself, but if someone
has they can share I can get my report out and go back and send a patch
later.

Thanks for any help.

Nicholas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._