TipInstability: Tip instability

Description Usage Arguments Details Author(s) References See Also Examples

Description

TipInstability() calculates the instability of each leaf in a tree. Unstable leaves are likely to display roguish behaviour.

Usage

1
2
3
4
5
6
7
8
9
TipInstability(
  trees,
  log = TRUE,
  average = "mean",
  deviation = "sd",
  checkTips = TRUE
)

ColByStability(trees, log = TRUE, average = "mean", deviation = "sd")

Arguments

trees

List of trees to analyse.

log

Logical specifying whether to log-transform distances when calculating leaf stability.

average

Character specifying whether to use 'mean' or 'median' tip distances to calculate leaf stability.

deviation

Character specifying whether to use 'sd' or 'mad' to calculate leaf stability.

checkTips

Logical specifying whether to check that tips are numbered consistently.

Details

\insertCite

SmithCons;textualRogue defines the instability of a pair of leaves as the median absolute divergence in the graph geodesic (the number of edges in the shortest path between the leaves) across all trees, normalized against the mean graph geodesic. The instability of a single leaf is the mean instability of all pairs that include that leaf; higher values characterise leaves whose position is more variable between trees.

Other concepts of leaf instability include

Author(s)

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

References

\insertAllCited

See Also

Other tip instability functions: TipVolatility()

Examples

1
2
3
4
5
library("TreeTools", quietly = TRUE)
trees <- AddTipEverywhere(BalancedTree(8), 'Rogue')[3:6]
plot(consensus(trees), tip.col = ColByStability(trees))
instab <- TipInstability(trees, log = FALSE, ave = 'mean', dev = 'mad')
plot(ConsensusWithout(trees, names(instab[instab > 0.2])))

Rogue documentation built on Jan. 13, 2022, 5:07 p.m.