Learn R Programming

treeClust (version 1.1-7.1)

d3.dist: D3-style dissimilarity for a single tree

Description

Compute the set of pairwise dissimilarities across all observations in a tree. Each dissimilarity measures the extent to which observations are "far apart" in the tree: the dissimilarity is 0 if the pair land in the same leaf, 1 if they land on leaves that have only the root as common ancestors, and otherwise something intermediate.

Usage

d3.dist(mytree, return.pd = FALSE)

Value

Item of class "dist" giving inter-point distances.

Arguments

mytree

Output from "tree"

return.pd

If TRUE return the matrix of pairwise distances among leaves. Useful for debugging. Default FALSE.

Author

Sam Buttrey

Details

Two observations have distance 0 if they fall in the same leaf; otherwise, the distance measures the ratio of the deviance of a tree trimmed so that they do fall in the same leaf to the deviance of the original tree.

See Also

treeClust