event_locf | R Documentation |
A helper function to prepare survival data for use with LMTP estimators by imputing outcome nodes using last outcome carried forward when an observation experiences the event before the end-of-follow-up.
event_locf(data, outcomes)
data |
The dataset to modify. |
outcomes |
A vector of outcome nodes ordered by time. |
A modified dataset with future outcome nodes set to 1 if an observation experienced an event at any previous time point.
event_locf(sim_point_surv, paste0("Y.", 1:6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.