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
PERMANOVA(Distance, grupo, C = NULL, Efectos = NULL, nperm = 1000, seed = NULL, CoordPrinc=FALSE, dimens = 2, PCoA = "Standard", ProjectInd = TRUE, tol = 1e-04, DatosIni = TRUE)

Arguments

Distance

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

grupo

A factor containing the groups to compare.

C

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

Efectos

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.

Details

The function performs a PERMANOVA Analysis.

Value

The PERMANOVA function create a list that return:

call

Function

Title

MANOVA BASADO EN PERMUTACIONES

Type

PERMANOVA

Distances

A matrix containing the distances between individuals.

C

Contrasts Matrix.

Initial

Containing two matrices:

* Global -> Global contrast.

* Contrastes ->Contrar for groups.

DistMuestral

Sample distribution of F-exp from permutations.

pvalue

Estimate p-valor for PERMANOVA.

ExplainedVariance

Explained variance by Principal Coordinates selected.

Inertias

Own value, 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

Cummulative 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 González and José Luis Vicente Villardón

References

Anderson, M. J. (2001). 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
17
18
19
20
21
22
data(wine)
X = wine[,4:21]
D = DistanciasContinuas (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, Efectos=effects)
summary(perwine2)

laura20vg/permanova documentation built on Dec. 16, 2019, 10 p.m.