invtime               package:relsurv               R Documentation

_I_n_v_e_r_s_e _t_r_a_n_s_f_o_r_m_i_n_g _o_f _t_i_m_e _i_n _R_e_l_a_t_i_v_e _S_u_r_v_i_v_a_l

_D_e_s_c_r_i_p_t_i_o_n:

     This function can be used when predicting in Relative Survival
     using the transformed time regression model (using 'rstrans'
     function). It inverses the time from Y to T in relative survival
     using the given ratetable. The times Y can be produced with the
     'rstrans' function, in which case, this is the reverse function.
     This function does the transformation for one person at a time.

_U_s_a_g_e:

     invtime(y, age, sex, year, scale, ratetable, lower, upper)

_A_r_g_u_m_e_n_t_s:

       y: time in Y.

     age: age of the individual.  Must be in days.

     sex: sex of the individual. Must be coded in the same way as in
          the 'ratetable'.

    year: date of diagnosis. Must be in date format

   scale: numeric value to scale the results. If 'ratetable' is in
          units/day, 'scale = 365.25' causes the output to be reported
          in years. 

ratetable: a table of event rates, such as 'survexp.us'. 

   lower: the lower bound of interval where the result is expected.
          This argument is optional, but, if given, can shorten the
          time the function needs to calculate the result. 

   upper: the upper bound of interval where the result is expected. See
          'lower'  

_D_e_t_a_i_l_s:

     Works only with ratetables that are split by age, sex and year.
     Transforming can be computationally intensive, use lower and/or
     upper to guess the interval of the result and thus speed up the
     function.

_V_a_l_u_e:

     A list of values 

       T: the original time

       Y: the transformed time

_S_e_e _A_l_s_o:

     'rstrans'

_E_x_a_m_p_l_e_s:

     data(slopop)
     invtime(y = 0.1, age = 23011, sex = "male", year = 9497, ratetable = slopop)

