perm_test | R Documentation |
Permutation test for PLS and PLS-DA models. The Y variable is permutated and a model is then fitted. From this model the R2Ycum and Q2cum are calculated.
perm_test(pls_model, perm = 200, scale = FALSE)
pls_model |
The PLS or PLS-DA model created by the pls package |
perm |
number of permutations (default = 200) |
scale |
should scaling be used. Use the same settings as used in the original model (see details). |
The scaling for the PLS / PLS-DA model has to be given to the function. At the moment
this can not be retrieved from the original model. The function sample()
is used to
randomize the Y variable. With set.seed()
the random generator is seeded based on the
current date time.
Output is a plot showing the results.
Rico Derks
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.