Learn R Programming

vegan (version 1.6-0)

anosim: Analysis of Similarities

Description

Analysis of similarities (ANOSIM) provides a way to test statistically whether there is a significant difference between two or more groups of sampling units.

Usage

anosim(dis, grouping, permutations=1000, strata)

Arguments

dis
Dissimilarity matrix.
grouping
Factor for grouping observations.
permutations
Number of permutation to assess the significance of the ANOSIM statistic.
strata
An integer vector or factor specifying the strata for permutation. If supplied, observations are permuted only within the specified strata.

Value

  • The function returs a list of class anosim with following items:
  • callFunction call.
  • statisticThe value of ANOSIM statistic $R$
  • signifSignificance from permutation.
  • permPermutation values of $R$
  • class.vecFactor with value Between for dissimilarities between classes and class name for corresponding dissimilarity within class.
  • dis.rankRank of dissimilarity entry.
  • dissimilarityThe name of the dissimilarity index: the "method" entry of the dist object.

Details

Analysis of similarities (ANOSIM) provides a way to test statistically whether there is a significant difference between two or more groups of sampling units. Function anosim operates directly on a dissimilarity matrix. A suitable dissimilarity matrix is produced by functions dist or vegdist. The method is philosophically allied with NMDS ordination (isoMDS), in that it uses only the rank order of dissimilarity values.

If two groups of sampling units are really different in their species composition, then compositional dissimilarities between the groups ought to be greater than those within the groups. The anosim statistic $R$ is based on the difference of mean ranks between groups ($r_B$) and within groups ($r_W$):

$$R = (r_B - r_W)/(N/(N-1)/4)$$

The divisor is chosen so that $R$ will be in the interval $-1 \dots +1$, value $0$ indicating completely random grouping.

The statistical significance of observed $R$ is assessed by permuting the grouping vector to obtain the empirical distribution of $R$ under null-model.

The function has summary and plot methods. These both show valuable information to assess the validity of the method: The function assumes that all ranked dissimilarities within groups have about equal median and range. The plot method uses boxplot with options notch=TRUE and varwidth=TRUE.

References

Clarke, K. R. (1993). Non-parametric multivariate analysis of changes in community structure. Australian Journal of Ecology 18, 117-143.

See Also

dist and vegdist for obtaining dissimilarities, and rank for ranking real values. For comparing dissimilarities against continuous variables, see mantel.

Examples

Run this code
data(dune)
data(dune.env)
dune.dist <- vegdist(dune)
attach(dune.env)
dune.ano <- anosim(dune.dist, Management)
summary(dune.ano)
plot(dune.ano)

Run the code above in your browser using DataLab