event_locf {lmtp} | R Documentation |
Time To Event Last Outcome Carried Forward
Description
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.
Usage
event_locf(data, outcomes)
Arguments
data |
The dataset to modify. |
outcomes |
A vector of outcome nodes ordered by time. |
Value
A modified dataset with future outcome nodes set to 1 if an observation experienced an event at any previous time point.
Examples
event_locf(sim_point_surv, paste0("Y.", 1:6))
[Package lmtp version 1.4.0 Index]