imputation-methods: Function to impute missing values from an ExposomeSet

Description Usage Arguments Value See Also Examples

Description

This function is a wrapper of the functions mice and complete from the package mice. Also to the impute from the package Hmisc. The function is designed to use those functions to impute missing values on exposures (not in phenotypes).

Usage

1
imputation(object, select, ..., messages = FALSE)

Arguments

object

ExposomeSet which exposures will be imputed.

select

Exposures to be imputed. If missing, all exposes will be imputed.

...

Argument given to function mice of pakcage mice (printFlag is set from messages).

messages

(default FALSE) If set to TRUE messages from mice's function will be displayed.

Value

A new ExposomeSet with the imputed exposures.

See Also

plotMissings to plot the missing data of an ExposomeSet, tableMissings to get a table with the missing data of an ExposomeSet

Examples

1
2
3
4
5
## Not run: 
#Being x an ExposomeSet
x <- imputation(x)

## End(Not run)

rexposome documentation built on March 13, 2021, 2:01 a.m.