View source: R/fit_LME_landmark.R
find_LME_risk_set | R Documentation |
This function is a helper function for fit_LME_landmark
.
find_LME_risk_set( data_long, x_L, x_hor, predictors_LME, predictors_LME_time, responses_LME, responses_LME_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) |
predictors_LME |
Vector of character strings specifying the column names in |
predictors_LME_time |
Vector of character strings specifying the column names in |
responses_LME |
Vector of character strings specifying the column names in |
responses_LME_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 LME value for all predictors_LME 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.