bp                   package:event                   R Documentation

_C_r_e_a_t_e _a _V_e_c_t_o_r _o_f _C_u_m_u_l_a_t_i_v_e _N_u_m_b_e_r_s _o_f _P_r_e_v_i_o_u_s _E_v_e_n_t_s
_f_o_r _a _P_o_i_n_t _P_r_o_c_e_s_s (_B_i_r_t_h _P_r_o_c_e_s_s_e_s)

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

     bp(y, id, censor=1)

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

       y: Vector of times.

      id: Vector of corresponding individual identifiers for who had
          which sequence of times.

  censor: Vector of censoring indicators.

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

     'bp' creates a vector of length 'sum(y)' of cumulative numbers of
     previous events for each individual for use in fitting birth
     processes with 'ehr'. Add one if the process starts at an event.

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

     J.K. Lindsey

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

     'ehr', 'ident', 'pp', 'tccov', 'tpast', 'ttime', 'tvcov'.

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

     y <- c(5,3,2,4)
     i <- c(1,1,2,2)
     birth <- bp(y, i)
     birth

