Learn R Programming

missMDA (version 1.5)

imputeAFDM: Impute dataset with mixed data

Description

Impute the missing values of a dataset with the quantitative and categorical variables using the principal component method AFDM. Can be used as a preliminary step before performing a AFDM on an incomplete dataset.

Usage

imputeAFDM(X, ncp = 2, method = "Regularized", row.w = NULL,
      coeff.ridge=1,threshold = 1e-06, seed = NULL, nb.init = 1, maxiter = 1000,...)

Arguments

X
a data.frame with continuous and categorical variables containing missing values
ncp
integer corresponding to the number of components used to reconstruct data with the PCA reconstruction formulae
method
"Regularized" by default or "EM"
row.w
an optional row weights (by default, a vector of 1 over the number of rows for uniform row weights)
coeff.ridge
a positive coefficient that permits to shrink the eigenvalues more than by the mean of the last eigenvalues (by default, 1 the eigenvalues are shrunk by the mean of the last eigenvalues; a coefficient between 1 and 2 is required)
threshold
the threshold for assessing convergence
seed
a single value, interpreted as an integer for the set.seed function (if seed = NULL, missing values are initially imputed by the mean of each variable)
nb.init
integer corresponding to the number of random initializations; the first initialization is the mean of each variable
maxiter
integer, maximum number of iteration for the algorithm
...
further arguments passed to or from other methods

Value

  • completeObsthe imputed dataset; the observed values for non-missing entries and the imputed values for missing values
  • objectivethe criterion, the mean square error between the reconstructed data and the observed data
  • reconthe reconstructed data

Details

The output can be used as an input in the AFDM function.

See Also

imputePCA