

survdiff(survival4)                          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

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

     survdiff(formula, data,  rho=0, subset)

_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 vec-
          tor giving the survival probability of each sub-
          ject.  For a k-sample test, each unique combina-
          tion of predictors defines a subgroup.  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' argu-
          ment.

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

     rho: a parameter that controls the type of test.

  subset: subset of the observations to be used in the fit.

       n: the number of subjects in each group.

     obs: the weighted observed number of events in each
          group.

     exp: the weighted expected number of events in each
          group.

   chisq: the chisquare statistic for a test of equality.

_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.

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

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

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

     `survdiff.print'.

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

     data(ovarian)
     survdiff(Surv(futime, fustat) ~ rx)
     dontrun{
     library(ratetables)
     expect <- survexp(entry, birth, sex, futime)
     survdiff(Surv(futime, fustat) ~ offset(expect$surv))  #One sample log-rank
     }

