

survdiff(survival5)                          R Documentation

_T_e_s_t _S_u_r_v_i_v_a_l _C_u_r_v_e _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 sur-
     vival curves using the G-rho family of tests, or for a
     single curve against a known alternative.

_U_s_a_g_e_:

     survdiff(formula, data, subset, na.action, rho=0)

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

 formula: a formula expression as for other survival models,
          of the form `Surv(time, status) ~ 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 combi-
          nation 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.

    data: an optional data frame in which to interpret the
          variables occurring in the formula.

  subset: expression indicating which subset of the rows of
          data should be used in the fit.  This can be a
          logical vector (which is replicated to have length
          equal to the number of observations), a numeric
          vector indicating which observation numbers are to
          be included (or excluded if negative), or a char-
          acter vector of row names to be included.  All
          observations are included by default.

na.action: a missing-data filter function.  This is applied
          to the `model.frame' after any subset argument has
          been used.  Default is `options()$na.action'.

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

       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.

_V_a_l_u_e_:

     a list with components:

_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.  When `rho = 0' this is the log-rank or Man-
     tel-Haenszel test, and when `rho = 1' it is equivalent
     to the Peto  Peto modification of the Gehan-Wilcoxon
     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.

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

     survdiff(Surv(futime, fustat) ~ rx)
     survdiff(Surv(time, status) ~ pat.karno + strata(inst), data=cancer)

     expect <- survexp(entry, birth, sex, futime)
     survdiff(Surv(futime, fustat) ~ offset(expect$surv))  #One sample log-rank

