impute_missing {MVN} | R Documentation |
Impute Missing Values
Description
Replace NA
s in numeric variables using simple methods or mice
-based imputation.
Usage
impute_missing(
data,
method = c("mean", "median", "mice"),
m = 5,
seed = 123,
...
)
Arguments
data |
A numeric matrix or data frame. |
method |
Character; one of |
m |
Integer; number of multiple imputations when |
seed |
Integer; random seed for |
... |
Additional arguments passed to |
Value
A data frame with missing values imputed.
Examples
## Not run:
df <- data.frame(x = c(1, NA, 3), y = c(4, 5, NA))
impute_missing(df, method = "mice")
## End(Not run)
[Package MVN version 6.1 Index]