View source: R/fit_LOCF_landmark.R
find_LOCF_risk_set | R Documentation |
This function is a helper function for fit_LOCF_landmark
.
find_LOCF_risk_set( data_long, x_L, x_hor, covariates, covariates_time, individual_id, event_time, event_status )
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) |
x_hor |
Numeric specifying the horizon time(s) |
covariates |
Vector of character strings specifying the column names in |
covariates_time |
Vector of character strings specifying the column names in |
individual_id |
Character string specifying the column name in |
event_time |
Character string specifying the column name in |
event_status |
Character string specifying the column name in |
This function finds the risk set for each of landmark times in x_L. This means that each of the individuals has a LOCF value for all covariates at the landmark time and has not experienced an event up to (and including) the landmark time.
List with elements corresponding to each landmark time in x_L. Each element is a data frame, containing only those individuals in the risk set at each of the landmark times x_L.
Isobel Barrott isobel.barrott@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.