Problems with robustPca in pcaMethods
Entering edit mode
Guest User ★ 12k
Last seen 8.1 years ago
Hi all; I'm new to R and trying to use the pcaMethods package to analyze a qPCR dataset. My dataset contains many missing values and I think the module I want to use is robustPca, but when I try to apply it to my dataset I keep getting the error described below. Using nipalsPca on my dataset works without errors, so I don't think it's a data-format issue. Using robustPca on the pcaMethods sample dataset "metaboliteData", which has missing values, also works fine (although it warns about missing values), so it isn't a general problem with my install of R and the relevant packages. The traceback results seems to say that the error is caused by a weighted-median calculation that is part of the robustPca command, but I have no idea why this only comes up using my dataset: could it be because my dataset is already median-normalized (before importing to R)? Troubleshooting this is beyond my abilities at this point; I'd be grateful for any insight anyone can offer. > pca_results <- pca(centered_data, method = "robustPca", nPcs = 10, center = FALSE) Error in if (!all(tmp)) { : missing value where TRUE/FALSE needed In addition: Warning message: In robustPca(prepres$data, nPcs = nPcs, ...) : Data is incomplete, it is not recommended to use robustPca for missing value estimation > traceback() 7: weightedMedian.default(x[keep]/a, abs(a), interpolate = FALSE) 6: weightedMedian(x[keep]/a, abs(a), interpolate = FALSE) 5: FUN(newX[, i], ...) 4: apply(x, 1, L1RegCoef, bk) 3: robustSvd(Matrix) 2: robustPca(prepres$data, nPcs = nPcs, ...) 1: pca(centered_data, method = "robustPca", nPcs = 10, center = FALSE) -- output of sessionInfo(): R version 3.0.2 (2013-09-25) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] parallel stats graphics grDevices utils datasets methods base other attached packages: [1] pcaMethods_1.52.1 Rcpp_0.11.0 matrixStats_0.8.14 Biobase_2.22.0 BiocGenerics_0.8.0 loaded via a namespace (and not attached): [1] R.methodsS3_1.6.1 tools_3.0.2 -- Sent via the guest posting facility at
pcaMethods pcaMethods • 776 views

Login before adding your answer.

Traffic: 256 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6