Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

phyloclust

Test for phylogenetic clustering


Description

The function tests the presence of phylogenetic clustering for species within a focal state.

Usage

phyloclust(tree,state,focal,nsim=100)

Arguments

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.

Details

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.

Value

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.

Author(s)

Silvia Castiglione, Pasquale Raia

Examples

data("DataFelids")
DataFelids$treefel->treefel
DataFelids$statefel->statefel

phyloclust(tree=treefel,state=statefel,focal="saber")

RRphylo

Phylogenetic Ridge Regression Methods for Comparative Studies

v2.5.0
GPL-2
Authors
Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
Initial release
2020-12-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.