kendall: Compute the Kendall distance matrix

View source: R/within_dist.R

kendallR Documentation

Compute the Kendall distance matrix

Description

Kendall's distance measures the depth of the most recent common infector (MRCI) for each pair of nodes with respect to the source (patient 0).

Usage

kendall(tree)

Arguments

tree

A data frame representing a transmission tree, with the first column containing the infector IDs and the second the infectee IDs.

Value

A square, symmetric matrix of Kendall's distances between nodes.

References

A Metric to Compare Transmission Trees - M Kendall ยท 2018

See Also

findMRCIs

Examples

tree <- data.frame(from = c(1, 1, 2, 2, 3, 3), to = c(2, 3, 4, 5, 6, 7))
kendall(tree)

mixtree documentation built on April 3, 2025, 8:01 p.m.