Replace missing values of data set by the mean of other observed values.
Usage
mean_impute(X)
Value
A complete data matrix with missing values imputed accordingly.
Arguments
X
An \(n\) x \(d\) matrix or data frame where \(n\) is the number of
observations and \(d\) is the number of columns or variables. Alternately,
X can be a vector of \(n\) observations.
References
Schafer, J. L. and Graham, J. W. (2002). Missing data: our view of the state of the art.
Psychological Methods, 7(2):147–177.
Little, R. J. A. and Rubin, D. B. (2020). Statistical analysis with missing data.
Wiley Series in Probability and Statistics. Wiley, Hoboken, NJ, 3rd edition