Survcomp             package:surv2sample             R Documentation

_C_o_m_p_e_t_i_n_g _R_i_s_k_s _S_u_r_v_i_v_a_l _D_a_t_a _O_b_j_e_c_t

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

     Create an object representing right-censored data with competing
     risks (types of failure).

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

     Survcomp(time, event)
     is.Survcomp(x)

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

    time: survival times (possibly right-censored).

   event: the status indicator, 0 = censored, 1 = dead from cause 1, 2
          = dead from cause 2,... Successive integers 1,2,... must be
          used for causes.

       x: any object.

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

     This is an extension of the standard function 'Surv' of the
     package 'survival'. 'Surv' allows only death and censoring, while
     'Survcomp' handles causes of death.

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

     'Survcomp' returns a matrix of class '"Survcomp"' with two columns
     (survival times, event types) with attribute '"ncauses"'
     containing the number of different causes of death (which is
     'max(event)'). There is a print method for objects of class
     '"Survcomp"', and the function 'is.Survcomp' for testing whether
     an object is of this class.

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

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

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

     'cif', 'Surv'

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

     ## bone marrow transplant data
     data(bmt1)

     ## cause of failure printed in brackets
     ## censored observations have a "+"
     print(a <- Survcomp(bmt1$time, bmt1$event))
     is.Survcomp(a)
     ## what's inside
     str(a)

