| fit_LOCF_longitudinal {Landmarking} | R Documentation | 
Find the last observation carried forward (LOCF) values for covariates in a dataset
Description
This function is a helper function for fit_LOCF_landmark.
Usage
fit_LOCF_longitudinal(
  data_long,
  x_L,
  covariates,
  covariates_time,
  cv_name = NA,
  individual_id
)
Arguments
data_long | 
 Data frame in long format i.e. there may be more than one row per individual  | 
x_L | 
 Numeric specifying the landmark time(s)  | 
covariates | 
 Vector of character strings specifying the column names in   | 
covariates_time | 
 Vector of character strings specifying the column names in   | 
cv_name | 
 Character string specifying the column name in   | 
individual_id | 
 Character string specifying the column name in   | 
Details
This function extracts the LOCF value for each of the covariates in data_long up to (and including) time x_L.
Value
List containing data_longitudinal, model_longitudinal, and call.
data_longitudinal has one row for each individual in data_long and
contains the LOCF value of covariates at the landmark time x_L.
model_longitudinal indicates that the LOCF approach is used.
call contains the call of the function.
Author(s)
Isobel Barrott isobel.barrott@gmail.com