imputation {rexposome} | R Documentation

## Function to impute missing values from an ExposomeSet

### 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

    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

    ## Not run:
    #Being x an ExposomeSet
    x <- imputation(x)

    ## End(Not run)

[Package rexposome version 1.6.0 Index]