Learn R Programming

RVAideMemoire (version 0.9-83-7)

pairwise.MVA.test: 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, ...)

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.

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.

Author

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

Details

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

See Also

MVA.test

Examples

Run this code
require(pls)
data(mayonnaise)

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

# The function needs a long calculation time!

Run the code above in your browser using DataLab