I was using MICE package to impute missing values in categorical variables.
imputed_Data_cat<-mice(data.frame(total$Credit_History,total$Self_Employed,total$Dependents,total$Gender,total$Loan_Amount_Term), m=5, maxit = 5, method = 'logreg')
However it is showing the following error :
iter imp variable 1 1 total.Credit_History total.Self_Employed total.Dependents Error in factor(vec, c(0, 1), levels(y)) : invalid 'labels'; length 4 should be 1 or 2 In addition: Warning messages: 1: Type mismatch for variable total.Dependents Imputation method logreg is not for factors with three or more levels. 2: Type mismatch for variable total.Loan_Amount_Term Imputation method logreg is not for factors with three or more levels.
Which method should be chosen instead of logistic regression in this case for categorical variables with 3 or more levels?