bootMice {bootImpute}R Documentation

Bootstrap then impute using mice

Description

Bootstraps an incomplete dataset and then imputes each bootstrap a number of times using the mice package. The resulting list of bootstrapped then imputed datasets can be analysed with bootImputeAnalyse. To run this function requires the mice package to be installed.

Usage

bootMice(obsdata, nBoot = 200, nImp = 2, nCores = 1, seed = NULL, ...)

Arguments

obsdata

The data frame to be imputed.

nBoot

The number of bootstrap samples to take. It is recommended that you use a minimum of 200. If you specify nCores>1, nBoot must be a multiple of the specified nCores value.

nImp

The number of times to impute each bootstrap sample. Two is recommended.

nCores

The number of CPU cores to use. If specified greater than one, bootImpute will impute using the number of cores specified.

seed

Random number seed.

...

Other arguments that are to be passed to mice.

Value

A list of imputed datasets.

Examples

library(mice)

head(ex_linquad)

#bootstrap 10 times and impute each twice
imps <- bootMice(ex_linquad, nBoot=10, nImp=2, seed=564764)

[Package bootImpute version 1.2.1 Index]