I am experimenting with the mice package in R and am curious about how i can leave columns out of the imputation.
- If i want to run a mean imputation on just one column, the
mice.impute.mean(y, ry, x = NULL, ...)
function seems to be what I would use. I'm struggling to understand what i need to include as the third argument to get this to work. - If i have a data set that includes categorical data such as name, ID, birth date, etc. which should not affect the calculation of other columns and should not be filled in when missing, how do i tell mice to exclude these columns in its calculation?
I've been using the mice dataset
nhanes
for my exploration.
Thanks