Learn R Programming

vegan (version 1.6-0)

vegdist: Dissimilarity Indices for Community Ecologists

Description

The function computes dissimilarity indices that are useful for or popular with community ecologists. Gower, Bray--Curtis, Jaccard and Kulczynski indices are good in detecting underlying ecological gradients (Faith et al. 1987). Morisita and Horn--Morisita indices should be able to handle different sample sizes (Wolda 1981), and Mountford (1962) index for presence--absence data should be able to handle unknown (and variable) sample sizes.

Usage

vegdist(x, method="bray", diag=FALSE, upper=FALSE)

Arguments

x
Community data matrix.
method
Dissimilarity index, partial match to "manhattan", "euclidean", "canberra", "bray", "kulczynski", "jaccard", "gower", "morisita", "horn
diag
Compute diagonals.
upper
Return only the upper diagonal.

Value

  • Should provide a drop-in replacement for dist and return a distance object of the same type.

eqn

$0 \dots 1$

code

vegan

Details

Jaccard and Mountford indices are discussed below. The other indices are defined as: ll{ euclidean $d_{jk} = \sqrt{\sum_i (x_{ij}-x_{ik})^2}$ manhattan $d_{jk} = \sum_i |x_{ij} - x_{ik}|$ gower $d_{jk} = \sum_i \frac{|x_{ij}-x_{ik}|}{\max x_i-\min x_i}$ canberra $d_{jk}=\frac{1}{N-Z} \sum_i \frac{|x_{ij}-x_{ik}|}{x_{ij}+x_{ik}}$ where $NZ$ is the number of non-zero entries. bray $d_{jk} = \frac{\sum_i |x_{ij}-x_{ik}|}{\sum_i (x_{ij}+x_{ik})}$ kulczynski $d_{jk} = 1-0.5(\frac{\sum_i \min(x_{ij},x_{ik})}{\sum_i x_{ij}} + \frac{\sum_i \min(x_{ij},x_{ik})}{\sum_i x_{ik}} )$ morisita $d_{jk} = \frac{2 \sum_i x_{ij} x_{ik}}{(\lambda_j + \lambda_k) \sum_i x_{ij} \sum_i x_{ik}}$ } where $\lambda_j = \frac{\sum_i x_{ij} (x_{ij} - 1)}{\sum_i x_{ij} \sum_i (x_{ij} - 1)}$ horn Like morisita, but $\lambda_j = \sum_i x_{ij}^2/(\sum_i x_{ij})^2$

References

Faith, D.P, Minchin, P.R. and Belbin, L. (1987). Compositional dissimilarity as a robust measure of ecological distance. Vegetatio 69, 57--68.

Mountford, M. D. (1962). An index of similarity and its application to classification problems. In: P.W.Murphy (ed.), Progress in Soil Zoology, 43--50. Butterworths.

Wolda, H. (1981). Similarity indices, sample size and diversity. Oecologia 50, 296--302.

See Also

decostand, dist, rankindex, isoMDS, stepacross.

Examples

Run this code
data(varespec)
vare.dist <- vegdist(varespec)
# Orl�ci's Chord distance: range 0 .. sqrt(2)
vare.dist <- vegdist(decostand(varespec, "norm"), "euclidean")

Run the code above in your browser using DataLab