pairwise.MVA.test: Pairwise permutation tests based on cross (model) validation

View source: R/pairwise.MVA.test.R

pairwise.MVA.testR Documentation

Pairwise permutation tests based on cross (model) validation

Description

Performs pairwise comparisons between group levels with corrections for multiple testing, using MVA.test.

Usage

pairwise.MVA.test(X, fact, p.method = "fdr", cmv = FALSE, ncomp = 8,
  kout = 7, kinn = 6, model = c("PLS-DA", "PPLS-DA", "LDA", "QDA",
  "PLS-DA/LDA", "PLS-DA/QDA", "PPLS-DA/LDA","PPLS-DA/QDA"),
  nperm = 999, progress = TRUE, ...)

Arguments

X

a data frame of independent variables.

fact

grouping factor.

p.method

method for p-values correction. See help of p.adjust.

cmv

a logical indicating if the test statistic (NMC) should be generated through cross-validation (classical K-fold process) or cross model validation (inner + outer loops).

ncomp

an integer giving the number of components to be used to generate all submodels (cross-validation) or the maximal number of components to be tested in the inner loop (cross model validation). Can be re-set internally if needed. Does not concern LDA and QDA.

kout

an integer giving the number of folds (cross-validation) or the number of folds in the outer loop (cross-model validation). Can be re-set internally if needed.

kinn

an integer giving the number of folds in the inner loop (cross model validation only). Can be re-set internally if needed. Cannot be > kout.

model

the model to be fitted.

nperm

number of permutations.

progress

logical indicating if the progress bar should be displayed.

...

other arguments to pass to MVA.test.

Details

The function deals with the limitted floating point precision, which can bias calculation of p-values based on a discrete test statistic distribution.

Value

method

a character string indicating what type of tests were performed.

data.name

a character string giving the name(s) of the data.

p.value

table of results.

p.adjust.method

method for p-values correction.

permutations

number of permutations.

Author(s)

Maxime HERVE <maxime.herve@univ-rennes1.fr>

See Also

MVA.test

Examples

require(pls)
data(mayonnaise)

# PPLS-DA
## Not run: pairwise.MVA.test(mayonnaise$NIR,factor(mayonnaise$oil.type),model="PPLS-DA")

# The function needs a long calculation time!

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.