Skip to contents

Internal function to impute missing values in additional variables using MICE.

Usage

impute_additional_variables(
  imputed_datasets,
  impute_vars,
  births,
  mice_covs,
  mice_m,
  mice_maxit,
  mice_method,
  seed,
  check_birth_cols = TRUE
)

Arguments

imputed_datasets

List of datasets with arsenic exposure already imputed

impute_vars

Character vector of variables to impute

births

Original birth data frame

mice_covs

Character vector of covariates for MICE

mice_m

Number of MICE imputations

mice_maxit

Maximum MICE iterations

mice_method

MICE imputation method

seed

Random seed

check_birth_cols

Logical indicating whether to check if impute_vars exist in the birth data

Value

List of datasets with additional variables imputed