I'm working on hot deck imputation in R using the hot.deck package and testing it out by following the example described here: <https://cran.r-project.org/web/packages/hot.deck/vignettes/Using_Hot_Deck_Data.pdf>

The data set is data(isq99). I'm going to skip the other variables that are created and just discuss the hot deck results. Here is *exactly* what I've done:

```
library(hot.deck)
data(isq99)
out <- hot.deck(isq99, sdCutoff=3, IDvars=c("IDORIGIN","YEAR"))

```

I'm stuck on combining the results using the mids technique on p. 3 (2.3 "Using mids"--I know it says out$imputations but that's if you convert to amelia):

```
library(miceadds)
out.mids <- datalist2mids(out$data)

```

When I do this, I get the following error message: 

```
Warning message:
In if (class(dat.list) %in% "imputationList") { :
  the condition has length > 1 and only the first element will be used

```

Here's what happens if I look at the structure of the original hot deck results:

```
            Length   Class  Mode   
data               5 mi     list   
affinity    14775370 -none- numeric
donors          4661 -none- list   
draws           4661 -none- list   
max.emp.aff     4661 -none- numeric
max.the.aff     4661 -none- numeric

```

I have no idea why it's rejecting out$data (which as expected has 5 versions of multiple imputation data)--is there something that I should have known about reducing the length into a single set first? 

Any help is appreciated. Apologies re: formatting or if I have forgotten anything - please let me know what else you need.

thanks