---begin included message -- Is there an automated way to use the survival package to generate survival rate estimates and their standard errors? To be clear, *not *the survivorship estimates (which are cumulative), but the survival *rate * estimates... --- end --
The classic method in epidemiology is simple hazard rates = total events / total time. This is done in more general form by the pyears (person-years) routine. pfit <- pyears(Surv(time, status) ~ agegrp + sex, data=mydata) It's advantage over simple tables is the ability to do time-dependent categories. For instance if I want death rates by decade of age: acut <- tcut(mydata$age, 0:12 *10) pfit2 <- pyears(time, status) ~ acut + sex, data=mydata) The first table was based on age at the start, the second on current age. For non-parametric estimates of the hazard function look at the "survival" task view on CRAN; there are several choices. Terry Therneau ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.