
Impute missing confounders by sampling from observed values
Source:R/tteenrollment_combine.R
tteenrollment_impute_confounders.RdThin standalone wrapper that delegates to trial$s1_impute_confounders().
Exists as a standalone function so it can be used as the default
impute_fn callback in $s1_generate_enrollments_and_ipw().
Arguments
- trial
A TTEEnrollment object.
- confounder_vars
Character vector of confounder column names to impute.
- seed
Integer seed for reproducibility (default: 4L).
Value
The modified TTEEnrollment object (invisibly).