ratetable package:survival R Documentation _R_a_t_e_t_a_b_l_e _r_e_f_e_r_e_n_c_e _i_n _f_o_r_m_u_l_a _D_e_s_c_r_i_p_t_i_o_n: This function matches variable names in data to those in a ratetable for 'survexp' _U_s_a_g_e: ratetable(...) _A_r_g_u_m_e_n_t_s: ...: tags matching dimensions of the ratetable and variables in the data frame (see example) _V_a_l_u_e: A data frame _S_e_e _A_l_s_o: 'survexp','survexp.us','is.ratetable' _E_x_a_m_p_l_e_s: fit <- survfit(Surv(time, status) ~ sex, pbc,subset=1:312) if (require(date)){ tdata <- data.frame(agedays=pbc$age*365.24, sex=pbc$sex +1, year= rep(mdy.date(1,1,1976), nrow(pbc))) tdata<-tdata[1:312,] ## only the randomised people, with no missing data efit <- survexp(~ sex+ratetable(sex=sex,age=agedays,year=year), data=tdata, ratetable=survexp.us, times=(0:24)*182) }