risksets                 package:eha                 R Documentation

_F_i_n_d_s _t_h_e _c_o_m_p_o_s_i_t_i_o_n_s _a_n_d _s_i_z_e_s _o_f _r_i_s_k _s_e_t_s

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

     Focus is on the risk set composition just prior to a failure.

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

     risksets(x, strata, max.survs)

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

       x: A 'Surv' object.

  strata: Stratum indicator.

max.survs: Maximum number of survivors in each risk set. If smaller
          than the 'natural number', survivors are sampled from the
          present ones.

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

     If the input argument max.survs is left alone, all survivors are
     accounted for in all risk sets.

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

     A list with components 

   antrs: No. of risk sets in each stratum. The number of strata is
          given by 'length(antrs)'.

risktimes: Ordered distinct failure time points.

eventset: vector of pointers to events in each risk set.

 riskset: vector of pointers to  the members of the risk sets, in
          order. The 'events'  first are the events.

    size: The sizes of the risk sets.

n.events: The number of events in each risk set.

_N_o_t_e:

     can be used to "sample the risk sets".

_A_u_t_h_o_r(_s):

     Gran Brostrm

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

     'table.events', 'coxreg', 'mlreg'

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

      enter <- c(0, 1, 0, 0)
      exit <- c(1, 2, 3, 4)
      event <- c(1, 1, 1, 0)
      risksets(Surv(enter, exit, event))

