You can do this directly with the survfit function (survival verstion 2.37 or
greater)
If status is a factor variable with levels of censored, relapse and death
fit <- survfit(Surv(time, status) ~ sex, data=mydata)
plot(fit, xlab=...
The primary advantage of this over the cuminc package is that all of the usual options for
survival plots carry forward.
Terry Therneau
On 02/05/2013 05:00 AM, [email protected] wrote:
Hello,
I have a problem regarding calculation of Cumulative Incidence Function.
The event of interest is failure of bone-marrow transplantation, which may
occur due to relapse or death in remission. The data set that I have
consists of- lifetime variable, two indicator variables-one for relapse and
one for death in remission, and the other variables are donor type (having
3 categories), disease type(having 3 categories), disease stage(having 3
categories) and karnofsky score (having 2 categories).
I want to create an R function for cumulative incidence function for the
event (failure of bone-marrow transplantation) due to relapse (cause-1) and
also for the event (failure of bone-marrow transplantation) due to death in
remission (cause-2). Can anyone help me please?
Tas.
______________________________________________
[email protected] 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.