Analysis of similarities (ANOSIM) provides a way to test statistically whether there is a significant difference between two or more groups of sampling units.
Data matrix or data frame in which rows are samples and columns are response variable(s), or a dissimilarity object or a symmetric square matrix of dissimilarities.
Factor for grouping observations.
Number of permutation to assess the significance of the ANOSIM statistic.
Choice of distance metric that measures the
dissimilarity between two observations. See
An integer vector or factor specifying the strata for permutation. If supplied, observations are permuted only within the specified strata.
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
method is philosophically allied with NMDS ordination
monoMDS), in that it uses only the rank order of
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
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 … +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. See
additional details on permutation tests in Vegan. The distribution
of simulated values can be inspected with the
The function has
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
The function returns a list of class
"anosim" with following
The value of ANOSIM statistic R
Significance from permutation.
Permutation values of R. The distribution of
permutation values can be inspected with function
Factor with value
Rank of dissimilarity entry.
The name of the dissimilarity index: the
anosim function can confound the differences between groups
and dispersion within groups and the results can be difficult to
interpret (cf. Warton et al. 2012). The function returns a lot of
information to ease studying its performance. Most
models could be analysed with
adonis which seems to be a
more robust alternative.
Jari Oksanen, with a help from Peter R. Minchin.
Clarke, K. R. (1993). Non-parametric multivariate analysis of changes in community structure. Australian Journal of Ecology 18, 117–143.
Warton, D.I., Wright, T.W., Wang, Y. 2012. Distance-based multivariate analyses confound location and dispersion effects. Methods in Ecology and Evolution, 3, 89–101
mrpp for a similar function using original
dissimilarities instead of their ranks.
vegdist for obtaining
rank for ranking real values. For
comparing dissimilarities against continuous variables, see
adonis is a more robust
alternative that should preferred.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.