This function conducts a test for cospeciation based on tree distance, applying a distance metric selected by the user. Note that this method should be prone to be quite liberal as the null hypothesis is no similarity between trees!
cospeciation(t1, t2, distance=c("RF","SPR"),
method=c("simulation","permutation"), assoc=NULL,
nsim=100, ...)
# S3 method for cospeciation
plot(x, ...)
# S3 method for cospeciation
print(x, ...)object of class "phylo".
object of class "phylo".
distance method to compare trees.
method to use (simulation of pure-birth trees, or permutation of tip labels on a fixed tree) to obtain a null distribution of tree distances via distance.
matrix containing the tip labels in t1 to match to the tip labels in t2. Note that not all labels in either tree need to be included; however, unlike cophylo, one label in t1 cannot be matched with more than one label in t2, nor vice versa. If NULL then an exact match of tip labels will be sought.
number of simulations or permutations.
for plot and print methods, an object of class "cospeciation".
optional arguments.
An object of class "cospeciation", which includes the test-statistic, the null distribution, and a p-value for the test of the null hypothesis of no topological similarity between the two trees.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.