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
[EMAIL PROTECTED] University of Washington, Seattle
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html