Closed santikka closed 3 months ago
This is not a bug. The documentation of the mice()
function states:
"For the j'th column, mice() calls the first occurrence of paste('mice.impute.', method[j], sep = '') in the search path."
Thus, changing the order changes the imputation model.
@stefvanbuuren thank you for the clarification.
Perhaps this is intended behavior, but the
method
argument seems to ignore its names. BecausepredictorMatrix
uses named columns and rows, I would expect thatmethod
could also be a named vector and the column order in the data could be safely ignored. Apparently this is not the case:Created on 2024-03-27 with reprex v2.1.0