Learn R Programming

RVAideMemoire (version 0.9-45-2)

pairwise.perm.manova: Pairwise permutational MANOVAs

Description

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

Usage

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

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.
p.method
method for p-values correction. See help of p.adjust.

Value

  • methoda character string giving the name of the test.
  • data.namea character string giving the name(s) of the data and the number of permutations.
  • p.valuetable of results.
  • p.adjust.methodmethod for p-values correction.

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.

See Also

anova.mlm, adonis

Examples

Run this code
require(vegan)
data(iris)

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

# 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],"euclidian"),iris$Species,nperm=49)

Run the code above in your browser using DataLab