Description Usage Arguments Details Value Author(s) References Examples
Calculates the D value, a measure of phylogenetic signal in a binary trait, and tests the estimated D value for significant departure from both random association and the clumping expected under a Brownian evolution threshold model. Does this across clades within a phylogeny.
1 2 3 4 5 6 7 |
data |
A 'comparative.data' or 'data.frame' object. |
phy |
An object of class 'phylo', required when data is not a 'comparative.data' object. |
names.col |
A name specifying the column in 'data' that matches rows to tips in 'phy', required when data is not a 'comparative.data' object. |
binvar |
The name of the variable in |
permut |
Number of permutations to be used in the randomisation test. |
rnd.bias |
An optional name of a variable in |
verbose |
Logical; do you want to know how many clades are being assessed, and see when each is being assessed? |
min.tips |
The minimum number of tips a clade should have for it to have a D value calculated. Defaults to 1 (i.e. no limit). |
max.tips |
The maximum number of species a clade should have for it to have a D value calculated. Defaults to the number of species in the whole phylogeny (i.e. no limit). |
min.nodes |
The minimum number of nodes a clade should have for it to have a D value calculated. Defaults to 1 (i.e. no limit). |
max.nodes |
The maximum number of nodes a clade should have for it to have a D value calculated. Defaults to the number of nodes in the whole phylogeny (i.e. no limit). |
x |
An object of class 'phylo.d.subset' |
object |
An object of class 'phylo.d.subset' |
... |
Further arguments to print and summary methods |
A wrapper function for phylo.d
, calculating D values for clades within a given dataset. These clades can be filtered according to the number of species and nodes using the arguments above. See phylo.d
for more details on the method itself.
Any clades for which there is no variation in the binary variable have NA
values for all of the below slots.
Returns an object of class 'phylo.d.subset', which is a list of the following:
raw |
A list of the raw output from |
DEstimate |
A vector of the estimated D values |
Pval1 |
A vector of p values, giving the result of testing whether D is significantly different from one, for each clade |
Pval0 |
A vector of p values, giving the result of testing whether D is significantly different from zero, for each clade |
phy.depth |
A numeric vector giving the age of the clade for which each value was calculated |
Susanne Fritz (SFritz@bio.ku.dk), Will Pearse and David Orme
Fritz, S. A. and Purvis, A. (2010). Selectivity in mammalian extinction risk and threat types: a new measure of phylogenetic signal strength in binary traits. Conservation Biology, 24(4):1042-1051.
1 2 3 4 5 6 7 8 | data(BritishBirds)
BritishBirds <- comparative.data(BritishBirds.tree, BritishBirds.data, binomial)
# Look at big clades only
## Not run:
bigClades <- phylo.d.subset(BritishBirds, binvar=Red_list, verbose=TRUE, min.tips=10, min.nodes=5)
print(bigClades)
## End(Not run)
|
Loading required package: ape
Loading required package: MASS
Loading required package: mvtnorm
Calculating D values for 39 out of a possible 180 clades.......................................
Calculation of D statistic for the phylogenetic structure of a binary variable
...across multiple clades within a phylogeny
Data : BritishBirds.data
Binary variable : Red_list
Phylogeny : BritishBirds.tree
Number of permutations : 1000
Estimated D values:
0.55595658 0.42911328 12.91723795 21.14955150 0.49496832 0.43260175 0.47042299 0.20089509 0.09091792 0.08912526 0.07356435 -0.10724895 -0.25914953 -0.17044891 -0.11097997 -0.08369418 0.44280862 1.38246215 1.46962888 -5.00282229 -0.59531720 -0.73430327 -0.49375444 -7.71674614 0.32500242 0.16387209 1.96999367 1.94025319 2.00827287 1.89703771 1.86410167 8.66339906 6.29379861 4.06390766 0.35995789 2.66958444 11.36074243 37.99137077 0.96840369
Probabilities of E(D) resulting from no (random) phylogenetic structure :
0.021 0.388 0.069 0.107 0.046 0.078 0.078 0.357 0.432 0.429 0.459 0.593 0.687 0.619 0.585 0.569 0.339 0.136 0.205 0.925 0.664 0.700 0.566 0.410 0.414 0.446 0.000 0.001 0.036 0.052 0.075 0.037 0.052 0.069 0.443 0.045 0.000 0.000 0.366
Probabilities of E(D) resulting from Brownian phylogenetic structure :
0.002 0.191 0.778 0.731 0.003 0.001 0.001 0.005 0.002 0.000 0.000 0.001 0.000 0.021 0.019 0.039 0.177 0.628 0.567 0.000 0.126 0.079 0.288 0.527 0.237 0.224 0.962 0.949 0.801 0.801 0.778 0.779 0.742 0.658 0.478 0.880 0.876 0.881 0.438
Ages of clades :
48.87067 31.48075 15.90036 10.73354 43.50966 38.40429 37.58275 34.31127 32.76279 26.05635 23.71699 23.14565 21.23208 17.42345 15.37542 14.92240 13.22074 11.35633 8.81296 20.40032 22.79944 21.03801 19.75306 19.24483 22.73886 19.90633 34.72796 34.34850 34.25345 27.22832 21.50751 14.93878 14.35418 11.65114 16.97445 32.97093 31.85343 31.62970 32.87979
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.