create_twin_branching_times: Generate twin branching times given estimated lambda and mu...

View source: R/create_twin_branching_times.R

create_twin_branching_timesR Documentation

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)

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;

Value

twin branching times

Author(s)

Giovanni Laudanno, Richèl J.C. Bilderbeek

Examples

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"
)

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