em is a em imputation function that returns categorical columns results both in factor and in onehot probability vector form. Please find the detailed documentation of em.mix and imp.mix in the 'mix' package. Only the modifications are explained on this page. After the estimation of parameter pi in em.mix, we change it into a tensor (multidimensional array) and extract the probability vector from this tensor with the help of function prob_vector_cat.

em(df, col_cat)

Arguments

df

Data matrix with missing values.

col_cat

Categorical columns index

Value

ximp imputed data matrix. ximp.disj imputed data matrix of same type as 'ximp' for the numeric columns. For the categorical columns, the prediction of probability for each category is shown in form of onehot probability vector.