| permutation_spls | R Documentation |
Performs a permutation test of an spls fit or a train object. Uses hyperparameters from the fit (or optimal caret::train-fit), which may be anti-conservative (overfit to data) so beware.
permutation_spls(fit, permutations = 1000, tester = cor, ..., comp = "all", seed = as.integer(Sys.time()), strata = NULL, fitfunc = mixOmics::spls)
fit |
A model from |
permutations |
The number of permutations to perform. |
tester |
A function used to compare the X and Y components, such as |
... |
Additional arguments to |
comp |
The component(s) that we wish to compute p values for as a numeric vector (e.g. 2:4), or "all" (default: "all"). |
seed |
Random seed. |
strata |
Value to constrain permutations. |
fitfunc |
The function used to compute the permuted fits, currently only works with |
A list with the elements
p.values - the computed p values per component
true - the true values (from tester) that will be compared to a null distribution
track - the permutation-distribution of values (from tester) that the true value was compared against.
seed - the random seed used, for reproducibility.
library(caret) x <- data.frame(matrix(rnorm(1000),nrow = 100)) y <- rnorm(100) PLS <- train(x = x, y = y, method = get_mixOmics_spls()) perms <- permutation_spls(PLS)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.