Hello,

I am trying to run an mi impute chained using (logit) and I get the following error message when I try to impute medications which is a binary variable indicating yes or no if the patient was on meds:

error occurred during imputation of... on m = 1
r(2000);

This is the code that I am running:

Code:
mi set wide
mi register imputed BMI bp medications
mi impute chained (pmm, knn(5)) BMI bp (logit) medications = age sex i.clinic i.individual intervention, add(50) force noisily savetrace("trace.dta",replace)
I did some checks to try and resolve the issue but it seems this happens to any binary variable that I try to impute (I have even purposefully introduced missing into some variables as a test):

1. Coded medications as 0 and 1
2. Simplified the imputation by imputing medications only
3. Tried mlogit but ran into convergence issues

When I run the imputation without medications, both BMI and bp impute just fine however.

Is this a common problem with mi impute (logit)?