event_locf: Time To Event Last Outcome Carried Forward

View source: R/utils.R

event_locfR 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))

lmtp documentation built on July 26, 2023, 5:33 p.m.