imputeMultilevel: Impute a multilevel mixed dataset

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/imputeMultilevel.R

Description

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".

Usage

1
2
imputeMultilevel(X, ifac = 1, ncpB = 2, ncpW=2, method=c("Regularized","EM"), 
    scale=TRUE, row.w = NULL, threshold = 1e-04, maxiter = 1000,...)

Arguments

X

a data.frame with continuous and categorical variables containing missing values

ifac

integer corresponding to the index of the group variable

ncpB

integer corresponding to the number of components used for the between group

ncpW

integer corresponding to the number of components used for the within group

method

"Regularized" by default or "EM"

scale

boolean. By default TRUE leading to a same weight for each variable. This is useful only when all the variables are continuous.

row.w

row weights (by default, uniform row weights)

threshold

the threshold for assessing convergence

maxiter

integer, maximum number of iteration for the algorithm

...

further arguments passed to or from other methods

Details

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.

Value

completeObs

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

Author(s)

Francois Husson [email protected] and Julie Josse [email protected]

References

Imputation of mixed data with multilevel singular value decomposition. F. Husson, J. Josse, B. Narasimhan, G. Robin

See Also

imputePCA,imputeFAMD

Examples

1
2
3
4
5
6
## Not run: 
## Example on artificial data
data(ozone)
res <- imputeMultilevel(ozone, ifac=12, ncpB=2, ncpW=2)

## End(Not run)

missMDA documentation built on June 26, 2018, 5:02 p.m.