cluster               package:survival               R Documentation

_I_d_e_n_t_i_f_y _c_l_u_s_t_e_r_s.

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

     This is a special function used in the context of survival models.
      It  identifies correlated groups of observations, and is used on
     the right hand  side of a formula. Using 'cluster()' in a formula
     implies that robust sandwich variance estimators are desired.

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

     cluster(x)

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

       x: A character, factor, or numeric variable.  

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

     The function's only action is semantic, to mark a variable as the 
     cluster indicator. The resulting variance is what is known as the
     ``working independence'' variance  in a GEE model.

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

     'x'

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

     'coxph',  'survreg'

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

     marginal.model <- coxph(Surv(time, status) ~ rx + cluster(litter), rats)
     frailty.model  <- coxph(Surv(time, status) ~ rx + frailty(litter), rats)

