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:

     data(pbc)
     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
     data(ratetables)
     efit <- survexp(~ sex+ratetable(sex=sex,age=agedays,year=year), data=tdata, ratetable=survexp.us, times=(0:24)*182)
     }

