nLTTstat_exact: Calculate the exact difference between two normalized...

Description Usage Arguments Value Author(s) Examples

View source: R/nLTTDiff.R

Description

This function takes two ultrametric phylogenetic trees, calculates the normalized Lineage-Through-Time statistic for both trees and then calculates the exact difference between the two statistics. Whereas the function nLTTstat uses an approximation to calculate the difference (which is faster for large trees), the function nLTTstat_exact calculates the exact difference, and should generally be preferred. Although the estimates are highly similar, nLTTstat_exact tends to return slightly higher values.

Usage

1
2
nLTTstat_exact(tree1, tree2, distance_method = "abs",
                 ignore_stem = TRUE, log_transform = FALSE)

Arguments

tree1

an object of class "phylo"

tree2

an object of class "phylo"

distance_method

Chosen measurement of distance between the two nLTT curves, options are (case sensitive):
- "abs": use the absolute distance.
- "squ": use the squared distance

ignore_stem

a boolean whether to ignore the stem length

log_transform

a boolean wether to log-transform the number of lineages before normalization

Value

The exact difference between the two nLTT statistics

Author(s)

Thijs Janzen

Examples

1
2
3
4
5
6
7
8
9
  data(exampleTrees)
  nltt_plot(exampleTrees[[1]])
  nltt_lines(exampleTrees[[2]], lty = 2)
  nLTTstat_exact(
    exampleTrees[[1]],
    exampleTrees[[2]],
    distance_method = "abs",
    ignore_stem = TRUE
  )

nLTT documentation built on Jan. 13, 2020, 9:06 a.m.