Learn R Programming

phytools (version 0.2-40)

ltt: Creates lineage-through-time plot (including extinct lineages)

Description

This function computes LTT plot with extant and extinct lineages, and optionally conducts $\gamma$-test of Pybus & Harvey (2000).

Usage

ltt(tree, plot=TRUE, drop.extinct=FALSE, log.lineages=TRUE, gamma=TRUE)

Arguments

tree
is a phylogenetic tree in "phylo" format, or an object of class "multiPhylo" containing a list of phylogenetic trees.
plot
a logical value indicating whether or not to create LTT plot.
drop.extinct
logical value indicating whether or not to drop extinct tips from the tree.
log.lineages
logical value indicating whether LTT plot should be on log-linear (default) or linear-linear scale.
gamma
logical value indicating whether or not to compute eqn{gamma} from Pybus & Harvey (2000; Proc. Roy. Soc. B).

Value

  • a list with the following components:
  • timesa vector of branching times.
  • ltta vector of linages.
  • gammaoptionally, a value for the gamma-statistic.
  • ptwo-tailed P-value for the gamma-test.
  • If tree is an object of class "multiPhylo", a list of the above list will be returned.

Details

It's unclear how to interpret the $\gamma$-statistic if not all the tips in the tree are contemporaneous.

References

Pybus, O. G., and P. H. Harvey. 2000. Testing macro-evolutionary models using incomplete molecular phylogenies. Proc. R. Soc. Lond. B, 267, 2267-2272.

See Also

gammatest

Examples

Run this code
trees<-pbtree(n=100,scale=100,nsim=10)
	ltt(trees,log.lineages=FALSE)
	tree<-rlineage(birth=1,death=0.25,Tmax=4)
	ltt(tree,gamma=FALSE)

Run the code above in your browser using DataLab