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) # The data set does not have entry date, use the midpoint of the study efit <- survexp(~ ratetable(sex=sex,age=age*365.35,year=as.Date('1979/1/1')) + sex, data=pbc, times=(0:24)*182) ## Not run: plot(fit, mark.time=F, xscale=365.25, xlab="Years post diagnosis", ylab="Survival") lines(efit, col=2, xscale=365.25) # Add the expected survival line ## End(Not run)