cuminc                package:cmprsk                R Documentation

_C_u_m_u_l_a_t_i_v_e _I_n_c_i_d_e_n_c_e _A_n_a_l_y_s_i_s

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

     Estimate cumulative incidence functions from competing risks data
     and test equality across groups

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

     cuminc(ftime, fstatus, group, strata, rho=0, cencode=0,
     subset, na.action=na.omit)

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

   ftime: failure time variable 

 fstatus: variable with distinct codes for different causes of failure
          and also a distinct code for censored observations 

   group: estimates will calculated within groups given by distinct
          values of this variable.  Tests will compare these groups. 
          If missing then treated as all one group (no test statistics) 

  strata: stratification variable.  Has no effect on estimates.  Tests
          will be stratified on this variable.  (all data in 1 stratum,
          if missing) 

     rho: Power of the weight function used in the tests. 

 cencode: value of fstatus variable which indicates the failure time is
          censored. 

  subset: a logical vector specifying a subset of cases to include in
          the analysis 

na.action: a function specifying the action to take for any cases
          missing any of ftime, fstatus, group, strata, or subset. 

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

     A list with components giving the subdistribution estimates for
     each cause in each group, and a component giving the test results
     (if the number of groups is >1).  The components giving the
     estimates have names that are a combination  of the group name and
     the cause code.  The estimate for each group and cause combination
     is also a list. 

     `$<_g_r_o_u_p_c_a_u_s_e>$_t_i_m_e' the times where the estimates are calculated

     `$<_g_r_o_u_p_c_a_u_s_e>$_e_s_t' the estimated sub-distribution functions. 
          These are step functions (all corners of the steps given), so
          they can be plotted using ordinary lines() commands.
          Estimates at particular times can be located using the
          timepoints() function.

     `$<_g_r_o_u_p_c_a_u_s_e>$_v_a_r' the estimated variance of the estimates, which
          are estimates of the asymptotic variance of Aalen (1978).   

  $Tests: If the number of groups is >1, there is also a component at
          the top level giving the test statistics and p-values for
          comparing the subdistribution for each cause across groups. 
          The test statistics are described in Gray (1988). 

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

     Robert Gray

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

     Gray RJ (1988) A class of K-sample tests for comparing the
     cumulative incidence of a competing risk, ANNALS OF STATISTICS,
     16:1141-1154.

     Kalbfleisch and Prentice (1980) THE ANALYSIS OF FAILURE TIME DATA,
     p 168-9.

     Aalen, O. (1978) Nonparametric estimation of partial transition
     probabilities in multiple decrement models, ANNALS OF STATISTICS,
     6:534-545.

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

     `plot.cuminc' `timepoints' `print.cuminc'

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

     set.seed(2)
     ss <- rexp(100)
     gg <- factor(sample(1:3,100,replace=T),1:3,c('a','b','c'))
     cc <- sample(0:2,100,replace=T)
     strt <- sample(1:2,100,replace=T)
     print(xx <- cuminc(ss,cc,gg,strt))
     #Tests:
     #      stat        pv
     #1 3.393977 0.1832345
     #2 1.989511 0.3698139
     #Estimates and Variances:
     #$est
     #            1         2         3         4         5
     #a 1 0.1311269 0.2699184 0.3420625 0.3420625 0.3420625
     #b 1 0.2176471 0.2615686        NA        NA        NA
     #c 1 0.3816280 0.4889137 0.5723581        NA        NA
     #a 2 0.2257601 0.2972171 0.4415053 0.4415053 0.4415053
     #b 2 0.3117647 0.5878431        NA        NA        NA
     #c 2 0.2160508 0.2607532 0.2607532        NA        NA
     #
     #$var
     #              1           2           3          4          5
     #a 1 0.003922836 0.009113464 0.012507959 0.01250796 0.01250796
     #b 1 0.005528913 0.006916070          NA         NA         NA
     #c 1 0.009854126 0.012351948 0.015575726         NA         NA
     #a 2 0.005947601 0.007356628 0.014479506 0.01447951 0.01447951
     #b 2 0.007033454 0.010927780          NA         NA         NA
     #c 2 0.006497566 0.007867543 0.007867543         NA         NA
     plot(xx,lty=1,color=1:6)
     # see also test.R, test.out

