Hi everyone! I have a question about compositional data analysis. First, I have to deal with rounded zeros in my data. Dimensions of the data are [8, 3005]. The rows represents patients, columns refer to taxons with their quantities. I am trying imputation of rounded zeros using PLS regression. So, I set artificial detection limit equal to the 0.05-quantile for every 20th variable. Also, I attached the summary table of the data. And I run the code below.
genus_t <- t(genus)
dim(genus_t) #[8,3005]
dl <- rep(0, ncol(genus_t))
dl <- apply(genus_t, 2, quantile, 0.05)
for (i in seq(1, ncol(genus_t), 20)){
genus_t[genus_t[,i] < dl[i], i] <- 0
}
system.time(
replaced_lm <- imputeBDLs(genus_t, dl = dl, eps = 1,
method = "lm", verbose = FALSE,
R = 50, variation = TRUE)$x)
I got this error:
Error in checkData(x, dl) : Set detection limits larger than 0 for variables/parts including zeros Timing stopped at: 0.073 0.005 0.074
how can I handle this situation, I'd appreciate any help!