sim_yule_twin_tree: Create a twin tree from a phylogeny using a Yule process

View source: R/twin_to_yule_tree.R

sim_yule_twin_treeR Documentation

Create a twin tree from a phylogeny using a Yule process

Description

Create a twin tree from a phylogeny using a Yule process

Usage

sim_yule_twin_tree(
  true_phylogeny,
  method = "random_tree",
  n_replicates = 10000
)

Arguments

true_phylogeny

the true phylogeny; the actual evolutionary history of the species, of class phylo

method

determines how to create the twin tree

  • 'random_tree' just produces a random tree;

  • 'max_clade_cred' simulates n_replicates trees and uses maxCladeCred to create a consensus tree;

  • 'max_likelihood' simulates n_replicates trees and selects the most likely;

n_replicates

number of replicas to evaluate in order to create the twin tree

Value

a twin Yule tree of class phylo,

Author(s)

Richèl J.C. Bilderbeek, Giovanni Laudanno

See Also

Use sim_bd_twin_tree to simulate a Birth-Death twin tree. Use create_sim_yule_twin_tree_fun to get a partially evaluated function to use in the twinning_params (as created by create_twinning_params)

Examples

phylogeny <- ape::read.tree(text = "((A:2, B:2):1, C:3);")
yule_tree <- sim_yule_twin_tree(phylogeny)

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