Learn R Programming

pirouette (version 1.6.9)

create_twin_branching_times: Generate twin branching times given estimated lambda and mu and the original tree

Description

Generate twin branching times given estimated lambda and mu and the original tree

Usage

create_twin_branching_times(lambda, mu, phylogeny, n_replicates, method)

Value

twin branching times

Arguments

lambda

per-lineage speciation rate

mu

per-species extinction rate

phylogeny

a phylogeny of class phylo

n_replicates

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

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;

Author

Giovanni Laudanno, Richèl J.C. Bilderbeek

Examples

Run this code
phylogeny <- ape::read.tree(text = "(((A:1, B:1):1, C:2):1, D:3);")

create_twin_branching_times(
  lambda = 0.1,
  mu = 1.0,
  phylogeny = phylogeny,
  n_replicates = 1,
  method = "random_tree"
)

Run the code above in your browser using DataLab