edgeProbs: Compute the relative frequencies of state changes along edges

View source: R/utilities.R

edgeProbsR Documentation

Compute the relative frequencies of state changes along edges

Description

Computes the relative frequencies of character state changes along edges from a sample of stochastically mapped character histories.

Usage

edgeProbs(trees)

Arguments

trees

an object of class "multiSimmap" containing a sample of trees that are identical in topology & branch lengths with different stochastically mapped character histories.

Details

The function assumes that all trees in the sample differ only in their mapped histories & not at all in topology or branch lengths.

Note that edgeProbs only asks whether the starting and ending states of the edge differ in a particular way, and thus ignores multiple-hits along a single edge.

Value

The object that is returned is a matrix with the state changes & the relative frequency of each state change. Rows are in the order of the matrix edge for any of the mapped trees.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.

See Also

plotSimmap


liamrevell/phytools documentation built on March 4, 2024, 3:27 a.m.