interplinear              package:lgtdl              R Documentation

_A _f_u_n_c_t_i_o_n _t_o _p_r_o_v_i_d_e _e_s_t_i_m_a_t_e_s _o_f _t_h_e _r_e_s_p_o_n_s_e _f_o_r _a
_l_o_n_g_i_t_u_d_i_n_a_l _d_a_t_a _o_b_j_e_c_t. _T_h_e _e_s_t_i_m_a_t_e _i_s _o_b_t_a_i_n_e_d _b_y _l_i_n_e_a_r
_i_n_t_e_r_p_o_l_a_t_i_o_n _f_r_o_m _t_h_e _p_r_e_c_e_d_i_n_g _a_n_d _f_o_l_l_o_w_i_n_g _o_b_s_e_r_v_a_t_i_o_n_s.

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

     A linear interpolation, using `approx', is used to obtain
     estimates of the covariate at times other than those observed.

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

     interplinear(x, time, cov = NULL)
     interplinear.lgtdl(x, time, cov = NULL)
     interplinear.AsIs(x, ...)

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

       x: The `lgtdl' object that is to be interpolated. 

    time: 

     cov: The name of the covariate in the `lgtdl' object on which the
          interpolation should be based. It is not required if there is
          only one covariate.

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

     A vector containing the interpolated estimates of the covariate
     values at the requested times.

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

     Robert Gentleman

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

     `interpprev'

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

       x1<-data.frame(time=c(1,3,5), cov=c(4,6,8))
       x2<-data.frame(time=c(11,13,15), interest=c(66,45,88))
       x1<-as.lgtdl(x1)
       x2<-as.lgtdl(x2)
       interpprev(x1, 4)
       interpprev(x2, c(12, 14))

