[R] Kaplan-Meier for left truncated data?

Thomas Lumley thomas at biostat.washington.edu
Fri May 26 16:45:31 CEST 2000


On Fri, 26 May 2000, Fredrik Lundgren wrote:

> R-users!
> 
> How do I ask for the 'baseline hazard' of a coxph fit??

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


> 
> Fredrik Lundgren
> ----- Ursprungligt meddelande ----- 
> Från: "gb" <gb at stat.umu.se>
> Till: <r-help at stat.math.ethz.ch>
> Skickat: den 25 maj 2000 21:25
> Ämne: Re: [R] Kaplan-Meier for left truncated data?
> 
> 
> > 
> > I have got two late answers to this question, from Mai Zhou and Bendix
> > Carstensen. Both point out a 'trick': Use  coxph  to fit a model with
> > no covariates and ask for the 'baseline hazard' of that fit!  
> > Unlike  survfit,  coxph  allows for left truncated data.
> > 
> > Thanks to both!
> > 
> > Göran
> > 
> > > On Sun, 21 May 2000, gb wrote:
> > > 
> > > > 
> > > > Is there a function somewhere for estimating the survivor function
> > > > (plus confidence limits) when data are both left truncated and right
> > > > censored?  survfit in  survival5  doesn't like left truncation.
> > 
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > 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
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

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