untangle.specials package:survival R Documentation _H_e_l_p _P_r_o_c_e_s_s _t_h_e '_s_p_e_c_i_a_l_s' _A_r_g_u_m_e_n_t _o_f _t_h_e '_t_e_r_m_s' _F_u_n_c_t_i_o_n. _D_e_s_c_r_i_p_t_i_o_n: Given a 'terms' structure and a desired special name, this returns an index appropriate for subscripting the 'terms' structure and another appropriate for the data frame. _U_s_a_g_e: untangle.specials(tt, special, order=1) _A_r_g_u_m_e_n_t_s: tt: a 'terms' object. special: the name of a special function, presumably used in the terms object. order: the order of the desired terms. If set to 2, interactions with the special function will be included. _V_a_l_u_e: a list with two components: vars: a vector of variable names, as would be found in the data frame, of the specials. terms: a numeric vector, suitable for subscripting the terms structure, that indexes the terms in the expanded model formula which involve the special. _E_x_a_m_p_l_e_s: formula<-Surv(tt,ss)~x+z*strata(id) tms<-terms(formula,specials="strata") ## the specials attribute attr(tms,"specials") ## main effects untangle.specials(tms,"strata") ## and interactions untangle.specials(tms,"strata",order=1:2)