Impute an observed mode value for every missing value
Usage
impute_mode(ds, type = "columnwise")
Arguments
ds
A data frame or matrix with missing values.
type
One of: "columnwise", "rowwise", "total", "Two-Way" or "Winer"
(see details).
Value
An object of the same class as ds with imputed missing values.
Details
This function behaves exactly like impute_mean. The only
difference is that it imputes a mode instead of a mean. All types
from impute_mean are also implemented for impute_mode.
They are documented in impute_mean and
apply_imputation.
A mode value of a vector x is a most frequent value of x.
If this value is not unique, the first occurring mode value in x will
be used as imputation value.
References
Beland, S., Pichette, F., & Jolani, S. (2016). Impact on Cronbach's
\(\alpha\) of simple treatment methods for missing data.
The Quantitative Methods for Psychology, 12(1), 57-73.