I performed stochastic regression imputation to handle missing data, using the mice package in R. The code I used is below:
library(mice) stocImp <- mice(data1, method="norm.nob", m=1) data2 <- complete(stocImp)
My question is as follows: stochastic regression and other imputation methods are not ideal for binary variables, as they result in values below 0 and above 1, as well as non-integers between 0 and 1. However, my dependent variable and some key independent variables are coded in binary. As a result, I cannot use the imputed data set in logistic regression analysis.
Does mice (or any other package) include any options to constrain the imputed values for binary variables to 0 and 1 only? If not, are there any other reliable rounding functions in any other packages? I carefully read the details for the mice function in the package documentation, but I was not able to locate anything to that effect. Therefore, I am hoping that someone can provide me with a hack for mice, or simply recommend another package.