Code for the Q2Ys from permutation test
0
0
Entering edit mode
Eddie • 0
@f2dcf917
Last seen 21 months ago
Belgium

Hi all, I run a permutation test on opls-da and my Q2Y was significant. This was done with 300 permutations. I need to actually obtain the 300 values of Q2Y that were compared to the value of Q2Y obtained from non-permuted model. The code below automatically gives p-value and diagnostic plots but I"m also intrested in the 300 values of Q2Y. I would appreciate it if you could help with the code for that. Thank you

perm_Y_CE<-Y_CE[c(1:100)]
CEperm_oplsda <- opls(CEperm, perm_Y_CE, scaleC="standard",predI = 1, orthoI = 3,permI=300)
Metabolomics • 682 views
ADD COMMENT
0
Entering edit mode

The opls object contains the permMN matrix in the supplementary list (suppLs slot):

permMN <- CEperm_oplsda@suppLs[["permMN"]] 

The first row of permMN corresponds to the model without response permutation. The following rows correspond to the permutations. The sim column contains the values of the similarity between the permutated and the original response, and the Q2(cum) column gives the Q2 values.

plot(permMN[, c("sim", "Q2(cum)"])
ADD REPLY

Login before adding your answer.

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