Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.21.0005260835040.30807-100000@pc16.stat.umu.se>
Date: 2000-05-26T06:37:08Z
From: Göran Broström
Subject: Kaplan-Meier for left truncated data?
In-Reply-To: <000e01bfc6d6$49c65960$acc643c3@oemcomputer>

On Fri, 26 May 2000, Fredrik Lundgren wrote:

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

This interesting:

> start <- c(1,2,1,1)
> stopp <- c(3,4,5,6)
> event <- c(1,1,1,1)
> library(survival5)
> survfit(Surv(start, stopp, event))
Error in survfit.km(X, Y, casewt, ...) : Can only handle right censored
data

Does not work :-(

> res <- coxph(Surv(start, stopp, event) ~ 1)
> survfit(res)

Is ok! :-)

G?ran

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

-- 
 G?ran Brostr?m, professor           tel: +46 90 786 5223
 Department of Statistics            fax: +46 90 786 6614
 Ume? University
 SE-90187 Ume?, Sweden             e-mail: gb at stat.umu.se

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