strata               package:survival               R Documentation

_I_d_e_n_t_i_f_y _S_t_r_a_t_u_m _V_a_r_i_a_b_l_e_s

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

     This is a special function used in the context of the Cox survival
     model. It identifies stratification variables when they appear on
     the right hand side of a formula.

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

     strata(..., na.group=FALSE, shortlabel=FALSE)

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

     ...: any number of variables.  All must be the same length. 

na.group: a logical variable, if 'TRUE', then missing values are
          treated as a distinct level of each variable. 

shortlabel: if 'TRUE' omit variable names from resulting factor labels

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

     The result is identical to the 'interaction' function, but for the
     labeling of the factors ('strata' is more verbose).

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

     a new factor, whose levels are all possible combinations of the
     factors supplied as arguments.

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

     'coxph','interaction'

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

     a<-factor(rep(1:3,4))
     b<-factor(rep(1:4,3))
     levels(strata(a))
     levels(strata(a,b,shortlabel=TRUE))

     coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian)

