0
votes

I have a dataset with a rather large portion of missing values. I'm trying to do imputation using robComposition. But I keep getting the error message: "Error in quantile.default(d, k/length(d)) : missing values and NaN's not allowed if 'na.rm' is FALSE". This does not make sense to me. Why would missing values not be allowed if I'm trying to impute missing values? Here's a small subset of the data and code to reproduce the error

library(robCompositions)
p <- c(1.000000,2.083333,1.333333,1.166667,4.250000,1.083333,2.083333,1.166667,1.000000,1.000000) 
i <- c(1101.25,1675.00,2500.00,1612.50,NA,1750.0,600.00,0.00,1530.00,3158.50)
s <- c(34000,1550,NA,2750,375,1750,30000,20000,NA,NA)
x <- data.frame(p,i,s)
imp <- impCoda(x)
1

1 Answers

0
votes

After contact with one of the authors of robComposite it became apparant that I need to use imri() in the package VIM to impute data for non-composite models.