imputeData {mclust} | R Documentation |
Imputes missing data using the mix package.
imputeData(x, categorical = NULL, seed = NULL)
x |
A numeric vector, matrix, or data frame of observations containing missing values. Categorical variables are allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables. |
categorical |
A logical vectors whose ith entry is |
seed |
A seed for the function |
A dataset of the same dimensions as x
with missing values
filled in.
J. L. Schafer, Analysis of Imcomplete Multivariate Data, Chapman and Hall, 1997.
library(mix) # impute the continuos variables in the stlouis data stlimp <- imputeData( stlouis[,-(1:3)]) # plot imputed values imputePairs( stlouis[,-(1:3)], stlimp)