Internal function: induce informative missing to sample data in the package to demonstrate how AutoScore handles missing as a separate category
induce_informative_missing(
df,
vars_to_induce = c("Lab_A", "Vital_A"),
prop_missing = 0.4
)Returns df with selected columns modified to have missing.
A data.frame of sample data.
Names of variables to induce informative missing in. Default is c("Lab_A", "Vital_A").
Proportion of missing to induce for each
vars_to_induce. Can be a single value for a common proportion for
all variables (default is 0.4), or a vector with same length as
vars_to_induce.
Assume subjects with normal values (i.e., values close to the median) are more likely to not have measurements.