sim_tree_is_extinct_pd: simulation function to simulate a tree under the pd model,...

View source: R/simulation_tree_pd.R

sim_tree_is_extinct_pdR Documentation

simulation function to simulate a tree under the pd model, returning whether the tree went extinct before max_t or not. This function does not return a phylogenetic tree to improve computation speed.

Description

super fast function to simulate the process of diversification with diversity dependence and phylogenetic diversity dependence

Usage

sim_tree_is_extinct_pd(pars, max_t, num_repl = 1, max_lin)

Arguments

pars

parameter vector with c(mu, lambda_0, beta_N, beta_P)

max_t

crown age

num_repl

number of replicates

max_lin

number of lineages past which non-extinction is assumed.

Value

a tibble with five columns: 1) whether or not the tree went extinct, 2) the time of extinction (equal to the crown #' age in the absence of extinction), 3) the number of tips,4) the phylogenetic diversity at the


franciscorichter/emphasis documentation built on Jan. 6, 2025, 7:06 p.m.