Impute the missing values of a multilevel mixed dataset (with a variable that groups the individuals, and with continuous and categorical variables) using the principal component method "multilevel factorial analysis for mixed data".
imputeMultilevel(X, ifac = 1, ncpB = 2, ncpW=2, method=c("Regularized","EM"),
scale=TRUE, row.w = NULL, threshold = 1e-04, maxiter = 1000,...)
a data.frame with continuous and categorical variables containing missing values
integer corresponding to the index of the group variable
integer corresponding to the number of components used for the between group
integer corresponding to the number of components used for the within group
"Regularized" by default or "EM"
boolean. By default TRUE leading to a same weight for each variable. This is useful only when all the variables are continuous.
row weights (by default, uniform row weights)
the threshold for assessing convergence
integer, maximum number of iteration for the algorithm
further arguments passed to or from other methods
the mixed imputed dataset; the observed values are kept for the non-missing entries and the missing values are replaced by the predicted ones. For the continuous variables, the values are the same as in the tab.disj output; for the categorical variables missing values are imputed with the most plausible categories according to the values in the tab.disj output
Impute the missing entries of a multilevel mixed data using the iterative multilevel FAMD algorithm (method="EM") or the regularised iterative multilevel FAMD algorithm (method="Regularized").
We advice to use the regularized version of the algorithm to avoid the overfitting problems which are very frequent when there are many missing values. In the regularized algorithm, the singular values of the FAMD are shrinked.
Imputation of mixed data with multilevel singular value decomposition. F. Husson, J. Josse, B. Narasimhan, G. Robin
# NOT RUN {
## Example on artificial data
data(ozone)
res <- imputeMultilevel(ozone, ifac=12, ncpB=2, ncpW=2)
# }
Run the code above in your browser using DataLab