# raoD: Rao's quadratic entropy In picante: Integrating Phylogenies and Ecology

## Description

Calculates Rao's quadratic entropy, a measure of within- and among-community diversity taking species dissimilarities into account

## Usage

 `1` ``` raoD(comm, phy=NULL) ```

## Arguments

 ` comm ` Community data matrix ` phy ` Object of class phylo - an ultrametric phylogenetic tree (optional)

## Details

Rao's quadratic entropy (Rao 1982) is a measure of diversity in ecological communities that can optionally take species differences (e.g. phylogenetic dissimilarity) into account. This method is conceptually similar to analyses of genetic diversity among populations (Nei 1973), but instead of diversity of alleles among populations, it measures diversity of species among communities.

If no phylogeny is supplied, Dkk is equivalent to Simpson's diversity (probability that two individuals drawn from a community are from different taxa), Dkl is a beta-diversity equivalent of Simpson's diversity (probability that individuals drawn from each of two communities belong to different taxa), and H is Dkl standardized to account for within-community diversity.

If an ultrametric phylogeny is supplied, Dkk is equivalent to the mean pairwise phylogenetic distance (distance to MRCA) between two individuals drawn from a community, Dkl is the mean pairwise phylogenetic distance between individuals drawn from each of two communities, and H is Dkl standardized to account for within-community diversity.

D[kl] = sum(t[ij] * x[ki] * x[lj])

where x[ki] is the relative abundance of taxon i in community k and t[ij] is a matrix of weights for all pairs of taxa i,j. Without a phylogeny, when i=j, t[ij]=0, otherwise t[ij]=1. With a phylogeny, t[ij] is the phylogenetic distance to MRCA for taxa i,j.

H[kl] = D[kl] - (D[kk] + D[ll])/2

Alpha, beta and total measure the average diversity within, among, and across all communities based on Dkk and H values taking variation in number of individuals per community into account. A Fst-like measure is calculated by dividing beta by the total diversity across all samples.

## Value

A list of results

 ` Dkk ` Within-community diversity ` Dkl ` Among-community diversity ` H ` Among-community diversities excluding within-community diversity ` total ` Total diversity across all samples ` alpha ` Alpha diversity - average within-community diversity ` beta ` Beta diversity - average among-community diversity ` Fst ` Beta diversity / total diversity

## Warning

Alpha, beta, and total diversity components and Fst should not be interpreted as a measure of relative differentiation among versus within communities. See Jost (2007) for a detailed description of this problem. Hardy and Jost (2008) suggest Fst can be interpreted as 'local species identity excess' or 'local phylogenetic similarity excess' rather than as a measure of among-community differentiation.

## Author(s)

Steven Kembel <[email protected]>

## References

Hardy, O.J., and Jost. L. 2008. Interpreting and estimating measures of community phylogenetic structuring. J. Ecol. 96:849-852.

Jost, L. 2007. Partitioning diversity into independent alpha and beta components. Ecology 88: 24272439.

Nei, M. 1973. Analysis of gene diversity in sub-divided populations. Proceedings of the National Academy of Sciences of the USA 70:3321-3323.

Rao, C.R. 1982. Diversity and dissimilarity coefficients: a unified approach. Theoretical Population Biology 21:2443.

Webb, C.O., Ackerly, D.D., and Kembel, S.W. 2008. Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Version 4.0.1. http://www.phylodiversity.net/phylocom/.

`mpd`, `comdist`

## Examples

 ```1 2 3``` ```data(phylocom) raoD(phylocom\$sample) raoD(phylocom\$sample, phylocom\$phylo) ```

### Example output

```Loading required package: ape
This is vegan 2.4-4
\$Dkk
clump1   clump2a   clump2b    clump4      even    random
0.8750000 0.8611111 0.8611111 0.8611111 0.8750000 0.8437500

\$Dkl
clump1   clump2a   clump2b    clump4      even    random
clump1  0.8750000 0.9583333 0.9583333 0.9791667 0.9687500 0.9765625
clump2a 0.9583333 0.8611111 0.9722222 0.9583333 0.9687500 0.9843750
clump2b 0.9583333 0.9722222 0.8611111 0.9305556 0.9687500 0.9635417
clump4  0.9791667 0.9583333 0.9305556 0.8611111 0.9375000 0.9635417
even    0.9687500 0.9687500 0.9687500 0.9375000 0.8750000 0.9609375
random  0.9765625 0.9843750 0.9635417 0.9635417 0.9609375 0.8437500

\$H
clump1    clump2a    clump2b     clump4       even    random
clump1  0.00000000 0.09027778 0.09027778 0.11111111 0.09375000 0.1171875
clump2a 0.09027778 0.00000000 0.11111111 0.09722222 0.10069444 0.1319444
clump2b 0.09027778 0.11111111 0.00000000 0.06944444 0.10069444 0.1111111
clump4  0.11111111 0.09722222 0.06944444 0.00000000 0.06944444 0.1111111
even    0.09375000 0.10069444 0.10069444 0.06944444 0.00000000 0.1015625
random  0.11718750 0.13194444 0.11111111 0.11111111 0.10156250 0.0000000

\$total
[1] 0.9450692

\$alpha
[1] 0.8602941

\$beta
[1] 0.08477509

\$Fst
[1] 0.08970252

[1] "Dropping tips from the tree because they are not present in the community data:"
[1] "sp16" "sp23" "sp27" "sp28" "sp30" "sp31" "sp32"
\$Dkk
clump1  clump2a  clump2b   clump4     even   random
2.125000 2.472222 2.916667 3.472222 3.875000 3.554688

\$Dkl
clump1  clump2a  clump2b   clump4    even   random
clump1  2.125000 3.375000 4.041667 4.354167 4.03125 4.023438
clump2a 3.375000 2.472222 4.361111 4.208333 4.03125 3.911458
clump2b 4.041667 4.361111 2.916667 3.680556 4.03125 3.973958
clump4  4.354167 4.208333 3.680556 3.472222 3.93750 4.119792
even    4.031250 4.031250 4.031250 3.937500 3.87500 4.000000
random  4.023438 3.911458 3.973958 4.119792 4.00000 3.554688

\$H
clump1   clump2a   clump2b    clump4      even    random
clump1  0.000000 1.0763889 1.5208333 1.5555556 1.0312500 1.1835938
clump2a 1.076389 0.0000000 1.6666667 1.2361111 0.8576389 0.8980035
clump2b 1.520833 1.6666667 0.0000000 0.4861111 0.6354167 0.7382812
clump4  1.555556 1.2361111 0.4861111 0.0000000 0.2638889 0.6063368
even    1.031250 0.8576389 0.6354167 0.2638889 0.0000000 0.2851562
random  1.183594 0.8980035 0.7382812 0.6063368 0.2851562 0.0000000

\$total
[1] 3.858564

\$alpha
[1] 3.106005

\$beta
[1] 0.7525591

\$Fst
[1] 0.1950361
```

picante documentation built on May 15, 2018, 1:05 a.m.