Error when I use imputeBDLs() for imputation of rounded zeros using PLS regression.
0
0
Entering edit mode
2.2 years ago
seda ▴ 10

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 enter image description heresummary 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!

compositional imputeBDLs roundedzero PLSregression dataanalysis • 319 views
ADD COMMENT

Login before adding your answer.

Traffic: 3032 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6