I am currently trying to use hot deck data imputation to impute the DBC (psychometric test), but I keep getting the error:
Error in apply(data, 1, function(x) all(is.na(x))) :
dim(X) must have a positive length
Hi, thanks for your help.
My data set for the DBC isn't very large, it consists of 131 participants, of whom 83 have completed it. Below is what happens when I try to view it
It is very hard to help you with only the information you have here. If you do a reprex then I can run it locally and see the error first hand (hence my suggestion to create one).
At the moment, I can't say I know from which library you're pulling hot.deck nor what your complete dataset looks like etc. I have a feeling your input as a single column from data being fed into the function is the problem. Please have a look at the reprex link