TreeDist (version 1.1.1)

KendallColijn: Kendall-Colijn distance

Description

Calculate the Kendall-Colijn tree distance, a measure related to the path difference.

Usage

KendallColijn(tree1, tree2 = tree1)

KCVector(tree)

Arguments

tree1, tree2

Trees of class phylo, with leaves labelled identically, or lists of such trees to undergo pairwise comparison.

tree

A tree of class phylo.

Value

KendallColijn() returns an array of numerics providing the distances between each pair of trees in tree1 and tree2, or splits1 and splits2.

Functions

  • KCVector: Creates a vector that characterises a rooted tree, as described in Kendall & Colijn (2016).

Details

The Kendall-Colijn distance works by measuring, for each pair of leaves, the distance from the most recent common ancestor of those leaves and the root node. For a given tree, this produces a vector of values recording the distance-from-the-root of each most recent common ancestor of each pair of leaves.

Two trees are compared by taking the Euclidian distance between the respective vectors. This is calculated by taking the square root of the sum of the squares of the differences between the vectors.

This metric emphasizes the position of the root; the path difference instead measures the distance of the last common ancestor of each pair of leaves from the leaves themselves, i.e. the length of the path from one leaf to another.

References

Kendall2016TreeDist

See Also

treespace::treeDist is a more sophisticated, if more cumbersome, implementation that supports lambda > 0, i.e. use of edge lengths in tree comparison.

Other tree distances: JaccardRobinsonFoulds(), MASTSize(), MatchingSplitDistance(), NNIDist(), NyeSimilarity(), PathDist(), Robinson-Foulds, SPRDist(), TreeDistance()

Examples

Run this code
# NOT RUN {
KendallColijn(TreeTools::BalancedTree(8), TreeTools::PectinateTree(8))

set.seed(0)
KendallColijn(TreeTools::BalancedTree(8), lapply(rep(8, 3), ape::rtree))
KendallColijn(lapply(rep(8, 4), ape::rtree))
# }

Run the code above in your browser using DataCamp Workspace