tccov                 package:event                 R Documentation

_C_r_e_a_t_e _a _V_e_c_t_o_r _o_f _T_i_m_e-_c_o_n_s_t_a_n_t _C_o_v_a_r_i_a_t_e_s _f_o_r _a _P_o_i_n_t _P_r_o_c_e_s_s

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

     tccov(y, x, id)

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

       y: Vector of times.

       x: Vector covariate.

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

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

     'tccov' creates a vector of length 'sum(y)' of time-constant
     covariates for use with 'ehr'. 'id' must be numbered
     consecutively. 'x' must have one value for each distinct 'id',

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

     J.K. Lindsey

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

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

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

     y <- c(5,3,2,4)
     id <- c(1,1,2,2)
     x <- c(5.2,3.1)
     xcov <- tccov(y, x, id)
     xcov

