misl: MISL: Multiple Imputation by Super Learning

View source: R/misl.R

mislR Documentation

MISL: Multiple Imputation by Super Learning

Description

Imputes missing values using multiple imputation by super learning (under review).

Usage

misl(
  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
)

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"). To view all available learners, execute list_learners("continuous")

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"). To view all available learners, execute list_learners("binomial")

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"). To view all available learners, execute list_learners("categorical")

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.

Value

A list of m full tibbles.

Examples

# This will generate imputations for the built-in abalone dataset.
misl_imp <- misl(abalone,
    maxit = 2,
    m = 2,
    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")
)


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