Permutation test for OPLS-DA
0
0
Entering edit mode
Eddie • 0
@f2dcf917
Last seen 2.3 years ago
Belgium

Hi all, I have dataset consiting of a response Y which is bivariate and 200 variables. I run an OPLS-DA and things looks fine. I wanted to run permuation test but using the code provide in the document ("ropls: PCA, PLS(-DA) and OPLS(-DA) for multivariate analysis and feature selection of omics data, Etienne A. Th?evenot, January 24, 2016") I couldn't understand it and apply it to my data.

set.seed(123)
obsI <- 20
featVi <- c(2, 20, 200)
featMaxI <- max(featVi)
xRandMN <- matrix(runif(obsI * featMaxI), nrow = obsI)
yRandVn <- sample(c(rep(0, obsI / 2), rep(1, obsI / 2)))
 layout(matrix(1:4, nrow = 2, byrow = TRUE))
for(featI in featVi) {
randPlsi <- opls(xRandMN[, 1:featI], yRandVn, predI = 2,
permI = ifelse(featI == featMaxI, 100, 0),
 plotL = FALSE)
plot(randPlsi, typeVc = "x-score", parDevNewL = FALSE,
 parCexN = 1.3, parTitleL = FALSE)
 mtext(featI/obsI, font = 2, line = 2)
if(featI == featMaxI)
 plot(randPlsi, typeVc = "permutation", parDevNewL = FALSE,
 parCexN = 1.3)
 }
mtext(" obs./feat. ratio:", adj = 0, at = 0, font = 2, line = -2, outer = TRUE)

I couldn't see where is the sampling from the response and from the variables. Would you plaese help in this or suggest any other method for permuation test.

Thanks

Metabolomics • 1.6k views
ADD COMMENT
0
Entering edit mode

The idea behind the code is to randomly permute the response values, build an (O)PLS(-DA) model, and compare the obtained Q2Y value with the original Q2Y value obtained without permutation (see the reference below cited in the vignette). Numerical and graphical results are provided by the package (including the pQ2Y value of significance).

Szymanska, E., E. Saccenti, AK. Smilde, and JA. Westerhuis. 2012. “Double-Check: Validation of Diagnostic Statistics for PLS-DA Models in Metabolomics Studies.” Metabolomics 8 (1, 1): 3–16. http://dx.doi.org/10.1007/s11306-011-0330-3.

ADD REPLY

Login before adding your answer.

Traffic: 556 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