[R] Survival, Kaplan-Meier, left truncation
Göran Broström
gb at stat.umu.se
Wed Jan 7 13:15:09 CET 2004
On Wed, Jan 07, 2004 at 12:57:46PM +0100, 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 (?).
>
> 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")
Not type = "interval", but "count" (or just leave it out)
You can also use 'plot.Surv' in package 'eha' (for plotting).
--
Göran Broström tel: +46 90 786 5223
Department of Statistics fax: +46 90 786 6614
Umeå University http://www.stat.umu.se/egna/gb/
SE-90187 Umeå, Sweden e-mail: gb at stat.umu.se
More information about the R-help
mailing list