cendiff                 package:NADA                 R Documentation

_T_e_s_t _C_e_n_s_o_r_e_d _E_C_D_F _D_i_f_f_e_r_e_n_c_e_s

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

     Tests if there is a difference between two or more empirical
     cumulative distribution functions (ECDF) using the G-rho family of
     tests, or for a single curve against a known alternative.

     This function shares the same arguments as 'survdiff'. See
     'survdiff' for more info.

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

     cendiff(formula, rho=1, ...)

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

 formula: a formula expression as for other ECDF models, of the form
          'Cen(obs, censored) ~ predictors'.  For a one-sample test,
          the predictors must consist of a single 'offset(sp)' term,
          where 'sp' is a vector giving the survival probability of
          each subject. For a k-sample test, each unique combination of
          predictors defines a subgroup.  A 'strata' term may be used
          to produce a stratified test. To cause missing values in the
          predictors to be treated as a separate group, rather than
          being omitted, use the 'strata' function with its
          'na.group=T' argument. 

     rho: a scalar parameter that controls the type of test.  See
          Method below. 

     ...: additional items to pass to 'survdiff'.  Note 

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

     a list with components:

       n: the number of subjects in each group. 

     obs: the weighted observed number of events in each group.  If
          there are strata, this will be a matrix with one column per
          stratum. 

     exp: the weighted expected number of events in each group.  If
          there are strata, this will be a matrix with one column per
          stratum. 

   chisq: the chisquare statistic for a test of equality. 

     var: the variance matrix of the test. 

  strata: optionally, the number of subjects contained in each stratum. 

_M_e_t_h_o_d:

     This function implements the G-rho family of Harrington and
     Fleming (1982), with weights on each death of S(t)^rho, where S is
     the Kaplan-Meier estimate of survival. With 'rho = 0' this is the
     log-rank or Mantel-Haenszel test, and with 'rho = 1' it is
     equivalent to the Peto & Peto modification of the Gehan-Wilcoxon
     test.  The default is 'rho = 1', or the Peto & Peto test.

     If the right hand side of the formula consists only of an offset
     term, then a one sample test is done.  To cause missing values in
     the predictors to be treated as a separate group, rather than
     being omitted, use the 'factor' function with its 'exclude'
     argument.

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

     Lopaka(Rob) Lee <rclee@usgs.gov>

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

     Helsel, Dennis R. (2005).  Nondectects and Data Analysis;
     Statistics for censored environmental data.  John Wiley and Sons,
     USA, NJ.

     Harrington, D. P. and Fleming, T. R. (1982).  A class of rank test
     procedures for censored survival data.  _Biometrika_ *69*,
     553-566.

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

         # Contrived: are there diffs between instrument methods?
         obs        = c(0.5,    0.5,   1.0,  1.5,   5.0,    10,   100)
         censored   = c(TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE)
         instrument = as.factor(c('ICP', 'ICP', 'ICP', 'AA',  'AA',  'AA',  'AA'))

         cendiff(Cen(obs, censored)~instrument)

