R: Expected PD, PD Variance, and Edge Abundance Distribution of...
expected.pd
R Documentation
Expected PD, PD Variance, and Edge Abundance Distribution of a phylogeny
Description
Calculates the expected phylogenetic diversity (Faith's PD) and variance of PD under binomial sampling with a fixed probability of each tip being sampled, and the Edge-length Abundance Distribution of a phylogeny.
Calculate upper bound of PD variance? (default = TRUE)
Details
The function expected.pd calculates the expected phylogenetic diversity (Faith's PD - total branch length) for all subsets of a phylogeny, based on an analytic solution for expected PD.
The function variance.pd additionally calculates the variance of expected PD for all subsets of a phylogeny, based on an analytic solution for expected PD. If argument upper.bound=TRUE, a fast solution for the upper bound of the variance is returned. Otherwise, the exact solution for the variance is returned. Note that the exact solution is much slower than the upper bound solution.
The function ead calculates the edge abundance distribution (EAD), the length of edges with different numbers of descendant tips.
Value
n
Expected Number of tips sampled
expected.pd
Expected PD for a given n
variance.pd
Variance of PD for a given n
num.children
Number of tips descended from an edge
edge.length
Total phylogenetic edge length for a given number of tips descended from an edge
Author(s)
Steven Kembel <steve.kembel@gmail.com> and James O'Dwyer <jodwyer@santafe.edu>
References
J.P. O'Dwyer, S.W. Kembel, and J.L. Green. 2012. Phylogenetic Diversity Theory Sheds Light on the Structure of Microbial Communities. PLoS Comput Biol 8(12): e1002832.