Learn R Programming

tabula (version 3.1.1)

similarity: Similarity

Description

Similarity

Usage

similarity(object, ...)

# S4 method for matrix similarity( object, method = c("brainerd", "bray", "jaccard", "morisita", "sorenson", "binomial") )

# S4 method for data.frame similarity( object, method = c("brainerd", "bray", "jaccard", "morisita", "sorenson", "binomial") )

Value

A stats::dist object.

Arguments

object

A \(m \times p\) numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). A data.frame will be coerced to a numeric matrix via data.matrix().

...

Currently not used.

method

A character string specifying the method to be used (see details). Any unambiguous substring can be given.

Author

N. Frerebeau

Details

\(\beta\)-diversity can be measured by addressing similarity between pairs of samples/cases (Brainerd-Robinson, Jaccard, Morisita-Horn and Sorenson indices). Similarity between pairs of taxa/types can be measured by assessing the degree of co-occurrence (binomial co-occurrence).

Jaccard, Morisita-Horn and Sorenson indices provide a scale of similarity from \(0\)-\(1\) where \(1\) is perfect similarity and \(0\) is no similarity. The Brainerd-Robinson index is scaled between \(0\) and \(200\). The Binomial co-occurrence assessment approximates a Z-score.

binomial

Binomial co-occurrence assessment.

brainerd

Brainerd-Robinson quantitative index.

bray

Sorenson quantitative index.

jaccard

Jaccard qualitative index.

morisita

Morisita-Horn quantitative index.

sorenson

Sorenson qualitative index.

References

Magurran, A. E. (1988). Ecological Diversity and its Measurement. Princeton, NJ: Princeton University Press. tools:::Rd_expr_doi("10.1007/978-94-015-7358-0").

See Also

index_binomial(), index_brainerd(), index_bray(), index_jaccard(), index_morisita(), index_sorenson()

Other diversity measures: heterogeneity(), occurrence(), plot_diversity, plot_rarefaction, profiles(), rarefaction(), richness(), she(), simulate(), turnover()

Examples

Run this code
## Data from Huntley 2004, 2008
data("pueblo")

## Brainerd-Robinson measure
(C <- similarity(pueblo, "brainerd"))
plot_spot(C)

## Data from Magurran 1988, p. 166
data("aves")

## Jaccard measure (presence/absence data)
similarity(aves, "jaccard") # 0.46

## Sorenson measure (presence/absence data)
similarity(aves, "sorenson") # 0.63

# Jaccard measure (Bray's formula ; count data)
similarity(aves, "bray") # 0.44

# Morisita-Horn measure (count data)
similarity(aves, "morisita") # 0.81

Run the code above in your browser using DataLab