GammaEntropy: Reduced-bias gamma entropy of a metacommunity

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/GammaEntropy.R

Description

Calculates the reduced-bias Tsallis entropy of order q of a metacommunity.

Usage

1
2
GammaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, 
  Z = NULL, PhyloDetails = FALSE, CheckArguments = TRUE)

Arguments

MC

A MetaCommunity object.

q

A number: the order of entropy. Default is 1.

Correction

A string containing one of the possible corrections accepted by the bias-corrected entropy function (see details) or "None" or "Best", the default value.

Tree

An object of class hclust, phylo, phylog or PPtree. The tree must be ultrametric.

Normalize

If TRUE (default), the entropy returned by the function is normalized by the height of the tree (it is the weighted average value of the entropy in each slice).
If FALSE, it is the unnormalized weighted sum of the results.

Z

A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.

PhyloDetails

If FALSE (default), the function always returns a number. If TRUE and Tree is not Tree is not NULL then a PhyloValue object is returned with all details. That is used internally by DivPart to obtain the corrections used to estimate gamma entropy along the tree and apply them to the estimation of alpha diversity.

CheckArguments

Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Details

If Tree is not NULL, then phylogenetic entropy is calculated by bcPhyloEntropy.

Else, if Z is not NULL, then similarity-based entropy is calculated by bcHqz.

Else, neutral entropy is calculated by bcTsallis.

Value

A number equal to the calculated entropy.

Author(s)

Eric Marcon <[email protected]>

References

Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289.

Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339.

Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).

See Also

bcTsallis, bcPhyloEntropy

Examples

1
2
3
4
5
6
7
8
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
data(Paracou618)
# Calculate Simpson gamma entropy
GammaEntropy(Paracou618.MC, 2)
# Compare without correction
GammaEntropy(Paracou618.MC, 2, Correction = "None")
# Estimate phylogenetic Simpson gamma entropy
GammaEntropy(Paracou618.MC, 2, Tree = Paracou618.Taxonomy)   

entropart documentation built on Feb. 6, 2018, 1:04 a.m.