I´m using the mice
package in R to do multiple imputation. I´ve done several imputations with only numerical variables, the imputation method is predictive mean matching, and when I use stripplot(imp)
I get to see the observed and imputed values of all the variables.
The problem occurs when I impute a combination of categorical and numerical variables. The imputation method then is PMM for the numerical variables, and logistical regression for the categorical ones. Then, stripplot
only shows me the numerical variables. Using the code below I tried to force edu
, a categorical variable with 2 values, to be plotted:
stripplot(imp, imp$edu)
stripplot(imp, names(imp$edu))
And I got this error:
Error in stripplot.mids(imp, imp$edu) : Cannot pad extended formula.
Does anyone know how I can plot the values of the observed and the imputed values for both the numerical and the categorical variables?