survSplit package:survival R Documentation _S_p_l_i_t _a _s_u_r_v_i_v_a_l _d_a_t_a _s_e_t _a_t _s_p_e_c_i_f_i_e_d _t_i_m_e_s _D_e_s_c_r_i_p_t_i_o_n: Given a survival data set and a set of specified cut times, split each record into multiple subrecords at each cut time. The new data set will be in `counting process' format, with a start time, stop time, and event status for each record. _U_s_a_g_e: survSplit(data, cut, end, event, start, id = NULL, zero = 0, episode=NULL) _A_r_g_u_m_e_n_t_s: data: data frame cut: vector of timepoints to cut at end: character string with name of event time variable event: character string with name of censoring indicator start: character string with name of start time variable (will be created if it does not exist) id: character string with name of new id variable to create (optional) zero: If 'start' doesn't already exist, this is the time that the original records start. May be a vector or single value. episode: character string with name of new episode variable (optional) _D_e_t_a_i_l_s: The function also works when the original data are in counting-process format, but the 'id' and 'episode' options are of little use in this context. _V_a_l_u_e: New, longer, data frame. _S_e_e _A_l_s_o: 'Surv', 'cut', 'reshape' _E_x_a_m_p_l_e_s: aml3<-survSplit(aml,cut=c(5,10,50),end="time",start="start", event="status",episode="i") summary(aml) summary(aml3) coxph(Surv(time,status)~x,data=aml) ## the same coxph(Surv(start,time,status)~x,data=aml3) aml4<-survSplit(aml3,cut=20,end="time",start="start", event="status") coxph(Surv(start,time,status)~x,data=aml4)