Learn R Programming

entropart (version 1.1.3)

Dqz: Similarity-based diversity of a community

Description

Calculates the diversity of order $q$ of a probability vector according to a similarity matrix.

Usage

Dqz(Ps, q, Z, CheckArguments = TRUE)

Arguments

Ps
A probability vector, summing to 1.
q
A number.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Value

  • A number equal to the calculated diversity.

Details

Diversity is calculated following Leinster and Cobbold (2012): it is the reciprocal of the (generalized) average (of order q) of the community species ordinariness. A similarity matrix is used (as for Dqz), not a distance matrix as in Ricotta and Szeidl (2006). See the example.

References

Leinster, T. and Cobbold, C. (2012). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489.

See Also

Hqz, PhyloDiversity

Examples

Run this code
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
  data(Paracou618)
  # Prepare the similarity matrix
  DistanceMatrix <- as.matrix(Paracou618.dist)
  # Similarity can be 1 minus normalized distances between species
  Z <- 1 - DistanceMatrix/max(DistanceMatrix)
  # Calculate diversity of order 2
  Dqz(Paracou618.MC$Ps, 2, Z)

Run the code above in your browser using DataLab