View source: R/pairwise.perm.manova.R
pairwise.perm.manova | R Documentation |
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
.
pairwise.perm.manova(resp, fact, test = c("Pillai", "Wilks",
"Hotelling-Lawley", "Roy", "Spherical"), nperm = 999,
progress = TRUE, p.method = "fdr", F = FALSE, R2 = FALSE)
resp |
response. Either a matrix (one column per variable; objects of class |
fact |
grouping factor. |
test |
choice of test statistic when |
nperm |
number of permutations. |
progress |
logical indicating if the progress bar should be displayed. |
p.method |
method for p-values correction. See help of |
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. |
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.
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). |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
anova.mlm
, adonis
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.