pairwise.perm.manova: Pairwise permutation MANOVAs

View source: R/pairwise.perm.manova.R

pairwise.perm.manovaR Documentation

Pairwise permutation MANOVAs

Description

Performs pairwise comparisons between group levels with corrections for multiple testing. These pairwise comparisons are relevant after a permutation MANOVA, such as performed by adonis.

Usage

pairwise.perm.manova(resp, fact, test = c("Pillai", "Wilks",
  "Hotelling-Lawley", "Roy", "Spherical"), nperm = 999, 
  progress = TRUE, p.method = "fdr", F = FALSE, R2 = FALSE)

Arguments

resp

response. Either a matrix (one column per variable; objects of class "data.frame" are accepted and internally converted into matrices) or a distance matrix.

fact

grouping factor.

test

choice of test statistic when resp is a matrix (see anova.mlm).

nperm

number of permutations.

progress

logical indicating if the progress bar should be displayed.

p.method

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

F

should the table of F values be returned?

R2

should the table of R2 values be returned? For tests based on distance matrices only.

Details

If resp is a matrix, a classical MANOVA is performed and the distribution of the (pseudo-)F is computed through permutations. The function deals with the limitted floating point precision, which can bias calculation of p-values based on a discrete test statistic distribution.

If resp is a distance matrix, adonis is used to perform each comparison.

Value

method

a character string giving the name of the test.

data.name

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

p.value

table of results.

p.adjust.method

method for p-values correction.

F.value

table of F values (if required).

R2.value

table of R2 values (if required).

Author(s)

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

See Also

anova.mlm, adonis

Examples

require(vegan)
data(iris)

# permutation MANOVA
adonis(iris[,1:4]~Species,data=iris,method="euclidean")

# Pairwise comparisons
# (not enough permutations here but faster to run)
pairwise.perm.manova(iris[,1:4],iris$Species,nperm=49)

# or
pairwise.perm.manova(dist(iris[,1:4],"euclidean"),iris$Species,nperm=49)

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