simputation icon indicating copy to clipboard operation
simputation copied to clipboard

impute_rhd fails with "incorrect number of probabilities" when using pool = "multivariate"

Open LukasWallrich opened this issue 4 months ago • 1 comments

I am trying to use impute_rhd with distinct donor sets per missingness patters - but am stuck on this error message that I don't understand. I hope the reprex below helps, and would appreciate any advice how to work around this.

library(simputation)
iris_na <- mice::ampute(iris)
iris_na$amp |> impute_rhd(Sepal.Length + Sepal.Width ~ 1, pool = "multivariate")
#> Error in sample.int(length(x), size, replace, prob): incorrect number of probabilities
x <- iris_na$amp |> impute_rhd(Sepal.Length + Sepal.Width ~ 1)

Created on 2024-02-07 with reprex v2.0.2

LukasWallrich avatar Feb 07 '24 13:02 LukasWallrich

Thanks Lukas, we'll pick this up asap.

markvanderloo avatar Mar 08 '24 09:03 markvanderloo