Consistency: Consistency / retention "indices"

ConsistencyR Documentation

Consistency / retention "indices"

Description

Consistency() calculates the so-called consistency and retention "indices" for each character in a dataset, given a bifurcating tree. Although there is not a straightforward interpretation of these indices, they are sometimes taken as an indicator of the fit of a character to a tree. Values correlate with the number of species sampled and the distribution of taxa between character states, so are not strictly comparable between characters in which these factors differ.

Usage

Consistency(dataset, tree, compress = FALSE)

Arguments

dataset

A phylogenetic data matrix of phangorn class phyDat, whose names correspond to the labels of any accompanying tree.

tree

A tree of class phylo.

compress

Logical specifying whether to retain the compression of a phyDat object or to return a vector specifying to each individual character, decompressed using the dataset's index attribute.

Details

#TODO: Retention index not yet implemented.

Value

Consistency() returns a named vector specifying the consistency index (ci), retention index (ri), and rescaled consistency index (rc).

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

data(inapplicable.datasets)
dataset <- inapplicable.phyData[[4]]
Consistency(dataset, TreeTools::NJTree(dataset))

TreeSearch documentation built on Aug. 26, 2023, 9:06 a.m.