[R] Calculating the cumulative incidence function

Terry Therneau therneau at mayo.edu
Fri Feb 8 14:58:35 CET 2013


  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, r-help-request at r-project.org 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.



More information about the R-help mailing list