Learn R Programming

simcausal (version 0.1)

doLTCF: Last Timepoint Carried Forward (LTCF)

Description

Carry forward (forward impute) all missing variable values for simulated observations that have reached the end of their follow-up, as defined by the node of type (EOF=TRUE).

Usage

doLTCF(data, outcome)

Arguments

data
Simulated data.frame in wide format
outcome
Character string specifying the outcome node that is the indicator of the end of follow-up (observations with value of the outcome variable being 1 indicate that the end of follow-up has been reached). The outcome variable must be a binary node that was d

Value

  • Modified simulated data.frame, forward imputed all variables after outcome switched to 1.