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)

