create_exemplary_dd_tree_giappo: Create an exemplary diversity-dependent (DD) birth-death...

View source: R/create_exemplary_dd_tree_giappo.R

create_exemplary_dd_tree_giappoR Documentation

Create an exemplary diversity-dependent (DD) birth-death tree.

Description

Or: create a DD tree with a strong DD effect.

Usage

create_exemplary_dd_tree_giappo(
  n_taxa = 6,
  crown_age = 10,
  extinction_rate = 0.1,
  best_of_n_trees = 100
)

Arguments

n_taxa

number of tree tips

crown_age

the fixed crown age of the posterior. Set to NA to let it be estimated

extinction_rate

per-species extinction rate

best_of_n_trees

simulate this number of DD trees with the desired number of taxa,

Details

This algorithm does so, by simulating best_of_n_trees trees, then picks the tree that has the gamma statistic furthest away from zero. Trees with such a gamma statistic, have the strongest DD effect, as these deviate strongest from the expected exponential growth that regular birth-death (BD) trees have.

Value

a phylo

Author(s)

Giovanni Laudanno, Richèl J.C. Bilderbeek

Examples


n_taxa <- 3
crown_age <- 1

phylogeny <- create_exemplary_dd_tree(
  n_taxa = n_taxa,
  crown_age = crown_age
)

richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.