markvanderloo / simputation

Making imputation easy
GNU General Public License v3.0
91 stars 11 forks source link

fault in predictive mean matching #20

Closed markvanderloo closed 3 months ago

markvanderloo commented 6 years ago

the impute_pmm method uses the distance between donor and imputed values while it should use distance between predicted donor values and imputed values.

Example provided by Susie Jentoft by e-mail:

dat <- iris[1:15,]
dat[8,1] <- NA
impute_pmm(dat, Sepal.Length ~ Sepal.Width)

the value 5 is imputed, while 4.6 is expected.

markvanderloo commented 6 years ago

The clean solution will require a breaking, but not very problematic, change in the impute_pmm interface.