I'm trying to use the mice package in R for a project and discovered that the pooled results seemed to change the dummy code I had for one of the variables in the output.To... moreI'm trying to use the mice package in R for a project and discovered that the pooled results seemed to change the dummy code I had for one of the variables in the output.To elaborate, let's say I have a factor, foo, with two levels: 0 and 1. Using a regular lm would typically yield an estimate for foo1. Using mice and the pool function, however, yields an estimate for foo2. I included a reproducible example below using the nhanes dataset from the mice package. Any ideas why the might be occurring?require(mice)# Create age as: 0, 1, 2nhanes$age <- as.factor(nhanes$age - 1)head(nhanes)# age bmi hyp chl# 1 0 NA NA NA# 2 1 22.7 1 187# 3 0 NA 1 187# 4 2 NA NA NA# 5 0 20.4 1 113# 6 2 NA NA 184# Use a regular lm with missing data just to see output# age1 and age2 come up as expectedlm(chl ~ age + bmi, data = nhanes)# Call:# lm(formula = chl ~ age + bmi, data = nhanes)# Coefficients:# (Intercept) age1 age2 bmi # -28.948 55.810 104.724 6.921 imp <- mice(nhanes)str(complete(imp)) # still the same codingfit <-... less