cif               package:surv2sample               R Documentation

_E_s_t_i_m_a_t_e_s _o_f _C_u_m_u_l_a_t_i_v_e _I_n_c_i_d_e_n_c_e _F_u_n_c_t_i_o_n_s _f_o_r
_C_o_m_p_e_t_i_n_g _R_i_s_k_s _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Compute estimates of cumulative incidence functions for one or
     more samples of censored data with several competing risks (types
     of failure).

_U_s_a_g_e:

     cif(x, group)

_A_r_g_u_m_e_n_t_s:

       x: an object of class '"Survcomp"'.

   group: a vector giving for each observation the group to which the
          observation belongs. If there are K samples, 'group' may only
          contain values 1,...,K. If 'group' is missing, observations
          are assumed to be one sample.

_D_e_t_a_i_l_s:

     The cumulative incidence function F(t,j) is defined as the
     probability of failure by time t from a particular cause j in the
     presence of other competing risks 1,...,j-1,j+1,...,J, that is,
     F(t,j)=P(T<=t, e=j), where T is the failure time and e is the
     failure cause.

     The function 'cif' estimates cumulative incidence functions for
     all causes and all groups.

_V_a_l_u_e:

     'cif' returns a list of class '"cif"' with the following
     components: 

   [[k]]: a list containing estimates for the kth sample. It has
          components 'time' (sorted times in the group k), 'surv' (the
          Kaplan-Meier estimate of the overall survival in this group),
          and 'f', which is a matrix containing estimates of cumulative
          incidence functions for the kth sample. The jth column of 'f'
          is the cumulative incidence function for the cause j.

    time: the vector of sorted times.

   event: the vector of corresponding event types.

   group: the vector of corresponding group indicators.

 ncauses: the number of causes present in the data.

 ngroups: the number of samples.

_A_u_t_h_o_r(_s):

     David Kraus (<URL: http://www.davidkraus.net/>)

_R_e_f_e_r_e_n_c_e_s:

     Klein, J. P. and Moeschberger, M. L. (2003) _Survival Analysis.
     Techniques for Censored and Truncated Data._ Springer, New York.
     (Section 2.7)

_S_e_e _A_l_s_o:

     'Survcomp', 'plot.cif'

_E_x_a_m_p_l_e_s:

     ## bone marrow transplant data
     data(bmt1)

     print(a <- cif(Survcomp(bmt1$time, bmt1$event), bmt1$donor))
     str(a)

     ## several first times and cifs for group 1 (HLA-identical
     ## sibling donors)
     head(cbind(a[[1]]$time, a[[1]]$f))
     ## several last times and cifs for group 2 (HLA-matched
     ## unrelated donors)
     tail(cbind(a[[2]]$time, a[[2]]$f))

     ## plot aggregate cumulative incidence functions for each
     ## donor type to see probabilities within groups
     plot(a)

