adonis {vegan} | R Documentation

## Multivariate Analysis of Variance Using Distance Matrices

### Description

Analysis of variance using distance matrices — for partitioning distance matrices among sources of variation and fitting linear models to distance matrices.

### Usage

    adonis(formula, data, permutations = 5, method = "bray", strata = NULL,
         contr.unordered = "contr.sum", contr.ordered = "contr.poly")

### Arguments

`formula` | a typical model formula such as `Y ~ A + B*C`, but where `Y` is a data frame or a matrix; `A`, `B`, and `C` may be factors or continuous variables.
`data` | the data frame from which `A`, `B`, and `C` would be drawn.
`permutations` | number of replicate permutations used for the hypothesis tests (F tests).
`method` | the name of any method used in `vegdist` to calculate pairwise distances.
`strata` | groups (strata) within which to constrain permutations.
`contr.unordered, contr.ordered` | contrasts used for the design matrix (default in R is dummy or treatment contrasts for unordered factors).

### Details

`adonis` is a function for the analysis and partitioning sums of squares using semimetric and metric distance matrices. Insofar as it partitions sums of squares of a multivariate data set, it is directly analogous to MANOVA (multivariate analysis of variance). McArdle and Anderson (2001) and Anderson (2001) refer to the method as “nonparametric manova”. Further, as its inputs are linear predictors, and a response matrix of an arbitrary number of columns (2 to millions), it is a robust alternative to both parametric MANOVA and to ordination methods for describing how variation is atributed to different experimental treatments or uncontrolled covariates. It is also analogous to redundancy analysis (Legendre and Anderson 1999).

Typical uses of `adonis` include analysis of ecological community data (samples X species matrices) or genetic data where we might have a limited number of samples of individuals and thousands or millions of columns of gene expression data (e.g. Zapala and Schork 2006).

`adonis` is an alternative to AMOVA (nested analysis of molecular variance, Excoffier, Smouse, and Quattro, 1992; `amova` in the ade4 package) for both crossed and nested factors.

Like AMOVA (Excoffier et al. 1992), `adonis` relies on a long-understood phenomenon that allows one to partition sums of squared deviations from a centroid in two different ways (McArdle and Anderson 2001). The most widely recognized method, used, e.g., for ANOVA and MANOVA, is to first identify the relevant centroids and then to calculated the squared deviations from these points. For a centered n x p response matrix Y, this method uses the p x p inner product matrix Y'Y. The less appreciated method is to use the n x n outer product matrix YY'. Both AMOVA and `adonis` use this latter method. This allows the use of any semimetric (e.g. Bray-Curtis, aka Steinhaus, Czekanowski, and Sørensen) or metric (e.g. Euclidean) distance matrix (McArdle and Anderson 2001). Using Euclidean distances with the second method results in the same analysis as the first method.

Significance tests are done using F-tests based on sequential sums of squares from permutations of the raw data. Additional work should be done to validate these methods; preliminary work suggests substantive differences between permutations of the raw data versus permutations of the residuals. Further, the precise meaning of hypothesis tests will depend upon precisely what is permuted. The strata argument keeps groups intact for a particular hypothesis test where one does not want to permute the data among particular groups. For instance, `strata = B` causes permutations among levels of `A` but retains data within levels of `B` (no permutation among levels of `B`).

The default `contrasts` are different than in R in general. Specifically, they use “sum” contrasts, sometimes known as “ANOVA” contrasts. See a useful text (e.g. Crawley, 2002) for a transparent introduction. This is simply a personal pedagogical preference. The particular contrasts can be set to any `contrasts` specified in R, including Helmert and treatment contrasts.

Rules associated with formulae apply. See "An Introduction to R" for an overview of rules.

`print.adonis` shows the `aov.tab` component of the output.

### Value

This function returns typical, but limited, output for analysis of variance (general linear models).

`aov.tab` | Typical AOV table showing sources of variation, degrees of freedom, sequential sums of squares, mean squares, F statistics, partial R-squared and P values, based on N permutations.
`coefficients` | matrix of coefficients of the linear model, with rows representing sources of variation and columns representing species.
`f.perms` | an N by m matrix of the null F statistics for each source of variation based on N permutations of the data.

### Author(s)

Martin Henry H. Stevens HStevens@muohio.edu, adapted to vegan by Jari Oksanen.

### References

Anderson, M.J. 2001. A new method for non-parametric multivariate analysis of variance. Austral Ecology, 26: 32–46.

Crawley, M.J. 2002. Statistical Computing: An Introduction to Data Analysis Using S-PLUS

Excoffier, L., P.E. Smouse, and J.M. Quattro. 1992. Analysis of molecular variance inferred from metric distances among DNA haplotypes: Application to human mitochondrial DNA restriction data. Genetics, 131:479–491.

Legendre, P. and M.J. Anderson. 1999. Distance-based redundancy analysis: Testing multispecies responses in multifactorial ecological experiments. Ecological Monographs, 69:1–24.

McArdle, B.H. and M.J. Anderson. 2001. Fitting multivariate models to community data: A comment on distance-based redundancy analysis. Ecology, 82: 290–297.

Zapala, M.A. and N.J. Schork. 2006. Multivariate regression analysis of distance matrices for testing associations between gene expression patterns and related variables. Proceedings of the National Academy of Sciences, USA, 103:19430–19435.

### See Also

`mrpp`, `anosim`, `mantel`, `varpart`.

### Examples

    data(dune)
    data(dune.env)
    adonis(dune ~ Management*A1, data=dune.env, permutations=100)

[Package vegan version 1.8-8 Index]