PERMANOVA: PERMANOVA: MANOVA based on distances

Description Usage Arguments Details Value Author(s) References Examples

View source: R/PERMANOVA.R

Description

The correct application of MANOVA needs normal and homocedastic data and the number of variables be much smaller than the number of individuals, but for many applications the conditions do not hold. To extend the application to this data Anderson develops PERMANOVA. This non-parametric test based on distances uses permutation to approximate the sampling distribution of the test statistic.

Contrasts and Effects can be added to the calculations.

Usage

1
2
3
PERMANOVA(Distance, group, C = NULL, Effects = NULL, nperm = 1000, seed = NULL,
CoordPrinc = FALSE, dimens = 2, PCoA = "Standard", ProjectInd = TRUE, tol = 1e-04,
DatosIni = TRUE, PostHoc="bonferroni")

Arguments

Distance

A list of three elements containing the data, the distances between individuals and type of distance used.

group

A factor containing the groups to compare.

C

Contrast matrix. By default it is null and the identity is used.

Effects

A factor with the effects in the rows of C. By default it is null and each row is considered as an effect.

nperm

Number of permutations to perform. By default is 1000.

seed

Seed to start permutations. By default is null.

CoordPrinc

Should the principal coordinates be calculated?. By default is FALSE.

dimens

Number of dimensions to choose in the PCoA. By default is 2.

PCoA

The type of Principal Coordinates Analysis.

There are two possibilities:

* Standard

* Weighted

By default is Standard.

ProjectInd

Show the row coordinates. By default is TRUE.

tol

Tolerance.

DatosIni

It contains the initial data. By default is TRUE.

PostHoc

Correction method. There are eight possibilities:

*holm: Holm

*hochberg: Hochberg

*hommel: Hommel

*bonferroni: Bonferroni. By default is this method.

*BH:Benjamini & Hochberg

*BY: Benjamini & Yekutieli

*fdr: Benjamini & Hochberg

*none

Details

The function performs a PERMANOVA Analysis.

Value

The PERMANOVA function create a list that return:

call

Function.

Title

Permutation based MANOVA.

Type

PERMANOVA.

Distances

A matrix containing the distances between individuals.

C

Contrasts Matrix.

Initial

Containing two matrices:

* Global -> Global contrast.

* Contrastes ->Contrasts for groups.

DistMuestral

Sample distribution of F-exp from permutations.

pvalue

Estimate p-valor for PERMANOVA.

ExplainedVariance

Explained variance by Principal Coordinates selected.

Inertias

Eigenvalue, Explained variance, Cumulative explained variance.

MeanCoordinates

Mean Coordinates by groups for the dimensions obtained in the Principal Coordinates Analysis.

Qualities

Qualities representation by groups for the dimensions of PCoA.

CummulativeQualities

Cumulative qualities representation.

ClusterType

Cluster type selected.

Clusters

Clusters created.

ClusterNames

Names of clusters.

ClusterColors

Colors of clusters, color name and HTML code.

Author(s)

Laura Vicente-Gonzalez, Jose Luis Vicente-Villardon

References

Anderson, M. J. (2008). A new method for non-parametric multivariate analysis of variance. Austral ecology, 26(1):32–46.

Anderson, M. J. (2005). Permanova: a fortran computer program for permutational multivariate analysis of variance. Department of Statistics, University of Auckland, New Zealand, 24.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(wine)
X = wine[,4:21]
X=IniTransform(X)
D = DistContinuous (X)
perwine=PERMANOVA(D, wine$Group)
perwine


C = matrix(c(1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1), nrow=3, byrow=TRUE)
rownames(C)=c("C1", "C2", "C3")
colnames(C)=levels(wine$Group)

effects=factor(c(1,2,3))
levels(effects)=c("Origin", "Year", "Interaction")
perwine2=PERMANOVA(D, wine$Group, C=C, Effects=effects, CoordPrinc = TRUE)
summary(perwine2)

PERMANOVA documentation built on Sept. 6, 2021, 5:07 p.m.