[R] Survival, Kaplan-Meier, left truncation

Thomas Lumley tlumley at u.washington.edu
Wed Jan 7 17:20:40 CET 2004


On Wed, 7 Jan 2004, Rau, Roland wrote:

> Dear all,
>
> I have data from 1970 to 1990 for people above age 50.
> Now I want to calculate survival curves by age starting at age 50 using the
> Kaplan Meier Estimator.
> The problem I have is that there are already people in 1970 who are older
> than 50 years.
> I guess this is called delayed entry or left truncation (?).

Yes

> I thought the code would be:
>
> roland <- survfit(Surv(time=age.enter, time2=age.exit, event=status,
> type="interval")~1, weights=gewicht,
> 	type="kaplan-meier")
>
> But then R tells me that it can handle only right-censored or counting data.

The `interval' type is for interval-censored data.  Left-truncated,
right-censored data are so easy to handle with hazard-based models that
they are the default.  You want

  roland <- survfit(Surv(age.enter, age.exit, status))


	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list