powered by
After generating a cell means model matrix, impute expected values (mean or median for continous; hightest frequency for categorical).
imputeRough(data, Init = "mean")
imputeRough returns a list containing the following components:
imputeRough
Imputed values
Pre-imputed data frame
Imputed data frame
a dataset with missing values
For continous variables impute either the mean or median
Nelson Lee Afanador (nelson.afanador@mvdalab.com)
A completed data frame is returned that mirrors a model.matrix. NAs are replaced with column means or medians. If object contains no NAs, it is returned unaltered. This is the starting point for imputeEM.
model.matrix
NAs
dat <- introNAs(iris, percent = 25) imputeRough(dat)
Run the code above in your browser using DataLab