repeat_MIbench_experiment: Repeat a MIBench_experiment multiple times

View source: R/repeat_MIBench_experiment.R

repeat_MIbench_experimentR Documentation

Repeat a MIBench_experiment multiple times

Description

Repeat a MIBench_experiment multiple times

Usage

repeat_MIbench_experiment(
  dgp,
  MIalgorithm,
  m = 10,
  store_runs = FALSE,
  n_repetitions = 1000,
  n_cores = 4,
  seed = NULL,
  ...
)

Arguments

dgp

A dgp function in the format of MIBench

MIalgorithm

A multiple imputation algorithm in the format of MIBench

m

The number of imputations

store_runs

Set to TRUE if you want to store the output of the experiments. Default is FALSE.

n_repetitions

The number of repetitions (default is 1000) with fresh draws from the dgp function.

n_cores

The number of cores for parallel processing of the experiments.

seed

A random seed for the experiments. Note that a exact replication depends on the seed and the number of cores n_cores.

...

Additional arguments for the dgp function

Value

A list of class "MIbench_imputations"

Examples

df <- cars
regression <- lm(log(dist)~speed, data = df)
# Specifiying no scenario to simulate at the mean of speed.
simloglm(regression)
# Explicitily specifying a scenario.
simloglm(regression, scenario = list(speed = c(5, 10, 20)))

mneunhoe/MIBench documentation built on May 22, 2023, 11:07 p.m.