phyloclust | R Documentation |
The function tests the presence of phylogenetic clustering for species within a focal state.
phyloclust(tree,state,focal,nsim=100)
tree |
a phylogenetic tree. The tree needs not to be ultrametric or fully dichotomous. |
state |
the named vector of tip states. |
focal |
the focal state to be tested for phylogenetic clustering. |
nsim |
number of simulations to perform the phylogenetic clustering test. |
To test for phylogenetic clustering, the function computes the mean
cophenetic (i.e. evolutionary time) distance between all the species under
the focal
state. Such value is compared to a random distribution of
time distances obtained by sampling nsim
times as many random tips
as those under the focal
state. In the presence of significant
phylogenetic clustering, tips under the focal
state are randomly
removed until the p
becomes >0.05 or only 3 tips are left.
The function returns a list including the p-value ($p) for the test of phylogenetic clustering and a $declusterized object containing the declusterized versions of the original tree and state vector (i.e. tips are removed as to make p>0.05) and the vector of removed species.
Silvia Castiglione, Pasquale Raia
data("DataFelids")
DataFelids$treefel->treefel
DataFelids$statefel->statefel
phyloclust(tree=treefel,state=statefel,focal="saber")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.