misl_mnar: Imputes missing values using multiple imputation by super...

View source: R/misl_mnar.R

misl_mnarR Documentation

Imputes missing values using multiple imputation by super learning under the assumption of Missing Not At Random (MNAR)

Description

Imputes missing values using multiple imputation by super learning under the assumption of Missing Not At Random (MNAR)

Usage

misl_mnar(
  dataset,
  m = 5,
  maxit = 5,
  seed = NA,
  con_method = c("Lrnr_mean", "Lrnr_glm_fast"),
  bin_method = c("Lrnr_mean", "Lrnr_glm_fast"),
  cat_method = c("Lrnr_mean"),
  ignore_predictors = NA,
  quiet = TRUE,
  delta_con = 0,
  delta_cat = 1,
  delta_var = NA
)

Arguments

dataset

A dataframe or matrix containing the incomplete data. Missing values are represented with NA.

m

The number of multiply imputed datasets to create. The default is m=5.

maxit

The number of iterations for each of the m imputed datasets. The default is maxit=5.

seed

Specify whether or not to include a seed for reproducible research. The default is seed = NA.

con_method

A vector of strings to be supplied for building the super learner for columns containing continuous data. The default learners are con_method = c("Lrnr_mean", "Lrnr_glm").

bin_method

A vector of strings to be supplied for building the super learner for columns containing binomial data. Important to note that these values must only take on values c(0,1,NA). The default learners are bin_method = c("Lrnr_mean", "Lrnr_glm").

cat_method

A vector of strings to be supplied for building the super learner for columns containing categorical data. The default learners are bin_method = c("Lrnr_mean", "Lrnr_glmnet").

ignore_predictors

A vector of strings to be supplied for ignoring in the prediction of other variables. The default is ignore_predictors = NA

quiet

A boolean describing if progress of the misl algorithm should be printed to the console. The default is quiet = TRUE.

delta_con

An integer to specify by how much continuous values should be shifted for the delta adjustmenet method of a sensitivity analysis. If the user does not specify a value, the imputations will not be augmented. The default is delta_con = 0.

delta_cat

An integer to specify by how much binary/categorical values should be scaled for the delta adjustmenet method of a sensitivity analysis. If the user does not specify a value, the imputations will not be augmented. The default is delta_cat = 1.

delta_var

A character to specify which variable (if any) to be augmented with the sensitivity analysis. The default is delta_var = NA.

Value

A list of m full tibbles.

Examples

# This will generate imputations for the built-in abalone dataset.
misl_imp <- misl_mnar(abalone,
abalone, maxit = 2, m = 2, quiet = TRUE,
con_method = c("Lrnr_glm_fast", "Lrnr_earth", "Lrnr_ranger"),
bin_method = c("Lrnr_earth", "Lrnr_glm_fast", "Lrnr_ranger"),
cat_method = c("Lrnr_independent_binomial", "Lrnr_ranger"),
delta_cat = 3,
delta_var = "Length"
)


carpenitoThomas/misl documentation built on June 2, 2022, 12:30 p.m.