Subscript `ina` is a matrix, the data `donors[ina]` must have size 1

32 Views Asked by At

df_mom_educ <- impute_knn(dat=df, formula = mom_educ ~ x + w, pool = "complete", k = 5, backend = "simputation")

Error in [<-: ! Subscript ina is a matrix, the data donors[ina] must have size 1.

I'm getting the above error when trying to perform K-nearest neighbor imputation for the mom_educ variable. I was wondering if you could explain what this error means, and why I might be getting it? Thank you!

I tried using pool = "univariate" instead of "complete", but got the same error

0

There are 0 best solutions below