SV: [R] Kaplan-Meier for left truncated data?

Fredrik Lundgren fredrik.lundgren at norrkoping.mail.telia.com
Fri May 26 19:51:14 CEST 2000


summary of "How do I ask for the 'baseline hazard' of a coxph fit??"

Thank you to Thomas Lumley, Brian Ripley, Göran Bodström and Bendix Cartensen for their tips to use 
plot(survfit(a.coxph.fit)). Thomas Lumley suggests that to get the "real baseline hazard" I should use
-log(survfit(a.coxph.fit)$surv) and set all covariates=0
in which case I need to supply these values to survfit. But how do you supply covariate values to survfit?
Shouldn't  they be supplied to coxph in some way?

Fredrik Lundgren

"Thomas Lumley wrote may 26 2000 "

> One way is to take -log of the survival function
>     survfit(a.coxph.fit)$surv
> gives the survival function at the mean covariates, so
>    -log(survfit(a.coxph.fit)$surv)
> gives the hazard at the mean covariates.
> 
> Many people define the baseline hazard as the hazard at all covariates=0
> in which case you need to supply these values to survfit. This can be
> numerically unstable and in any case is usually not what you really want.
> 
> -thomas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list