distance_measures: Plug-in distance-measure functions for 'distShell'.

Distance MeasuresR Documentation

Plug-in distance-measure functions for distShell.

Description

Each function takes two (interchangeable) vectors of data and returns a measure of distance between them. Vectors may be just 1/0 values (presence-absence data) or non-negative integers (count data).

Usage

distBrayCurtis(d1, d2)
distChaoJaccCorr(d1, d2)
distChaoJaccNaive(d1, d2)
distChaoSorCorr(d1, d2)
distChaoSorNaive(d1, d2)
distChord(d1, d2)
distJaccard(d1, d2)
distMatching(d1, d2)
distMorisitaHorn(d1, d2)
distOchiai(d1, d2)
distPreston(d1, d2)
distRogersTanimoto(d1, d2)
distSimRatio(d1, d2)
distSorensen(d1, d2)
distWhittaker(d1, d2)

Arguments

d1, d2

vectors of equal length, specifying the two cases to be compared.

Details

distBrayCurtis

Complement of the Bray-Curtis index, see Magurran p.246, where it is referred to as the 'quantitative Sorensen' index. Based on count data.

distChaoJaccCorr, distChaoJaccNaive, distChaoSorCorr, distChaoSorNaive

Each is the complement of one of a series of similarity indices which allow for (1) relative abundance of shared species and (2) estimation of number of shared species not detected. Based on count data. See Chao et al. 2005.

distChord

Both vectors are normalized so that the sum of squares = 1, ie. they lie on the surface of a sphere of unit radius. The distance measure is the length of the cord joining the two points through the sphere, which is in [0, sqrt(2)], ie. it is sqrt(2) for sites with no species in common. Based on count data. See Zuur et al 2007:166, Legendre & Legendre 1998:279.

distJaccard

Complement of the Jaccard index of similarity; also known as "Marczewski-Steinhaus distance". Based on presence-absence data. No. of shared species / Overall number of species.

distMatching

A simple matching index: the proportion of elements which match in two presence-absence vectors (ie. present in both or absent in both). Zuur et al 2007:165.

distMorisitaHorn

The complement of the Morisita-Horn index of similarity. Based on count data. See Magurran 2004:246 The Morisita-Horn index is also known as "simplified Morisita". The "Morisita" and "Horn" indices are different again! See Krebs 1999:470-471.

distOchiai

Complement of the Ochiai coefficient of similarity. Based on count data. See Zuur et al 2007:167, Legendre & Legendre 1998:276.

distPreston

Preston's coefficient of faunal dissimilarity (z). Based on presence-absence data. See Preston 1962:418.

distRogersTanimoto

Complement of Rogers and Tanimoto's coefficient of similarity. Based on presence-absence data. See Zuur et al 2007:165.

distSimRatio

Complement of the Similarity Ratio. Based on count data. See Zuur et al 2007:167.

distSorensen

Complement of Sorensen (or Dice) index of similarity. Based on presence-absence data. No. of shared species / Average number of species. Same as Whittaker's distance measure for Incidence (presence-absence) data minus one (Magurran 2004:244).

distWhittaker

Whittaker's index of association for Abundance (count) data. See Zuur et al 2007:170.

Value

a scalar, the distance between the two vectors.

Author(s)

Mike Meredith

References

  • Chao, A; R L Chazdon; R K Colwell; T-J Shen. 2005. A new statistical approach for assessing similarity of species composition with incidence and abundance data. Ecology Letters 8:148-159.

  • Krebs, C J 1999. Ecological Methodology. Addison Wesley Longman.

  • Magurran, A E 2004. Measuring biological diversity. Blackwell.

  • Preston, F W. 1962. The canonical distribution of commonness and rarity: Part II. Ecology 43:410-432.

  • Zuur, A F; E N Ieno; G M Smith 2007. Analysing ecological data. Springer.

  • Legendre, P; L Legendre 1998. Numerical ecology. Elsevier, Amsterdam NL.

See Also

The basic distance computation function is dist in package stats. Other functions are vegan::vegdist and labdsv::dsvdis.

These functions provide the following distance measures:

  • binary (in dist) = asymmetric binary = Steinhaus

  • binomial (in vegdist)

  • bray/curtis (in dsvdis) = bray (in vegdist)

  • canberra (in dist and vegdist)

  • chao (in vegdist)

  • chisq (in dsvdis)

  • euclidean (in dist and vegdist)

  • gower (in vegdist)

  • horn (in vegdist) = Morisita-Horn or simplified Morisita

  • jaccard (in vegdist)

  • kulczynski (in vegdist)

  • manhattan (in dist and vegdist)

  • maximum (in dist)

  • minkowski (in dist)

  • morisita (not simplified!) (in vegdist)

  • mountford (in vegdist)

  • ochiai (in dsvdis)

  • raup (in vegdist) = Raup-Crick

  • roberts (in dsvdis)

  • ruzicka (in dsvdis)

  • sorensen (in dsvdis)

  • steinhaus (in dsvdis)= binary

Examples

data(distTestData)

distShell(distTestData, distJaccard)

distShell(distTestData, distMorisitaHorn)

mikemeredith/wiqid documentation built on Nov. 17, 2022, 5:10 a.m.