I am using the package Design for survival analysis. I want to plot a simple Kaplan-Meier fit of survival vs. age, with age grouped as quantiles. I can do this:

survplot(survfit(Surv(time,status) ~ cut(age,3), data=veteran)

but I would like to do something like this:

survplot(survfit(Surv(time,status) ~ quantile(age,3), data=veteran) #will not work

ideally I would like to superimpose estimates from cph models, which automatically fit the 2nd to 4rth quantiles for age, so I need the age groups to be grouped the same.

Any help greatly appreciated!
Eleni Rapsomaniki

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

Reply via email to