sim_tree_pd_cpp: simulation function to simulate a tree under the pd model

View source: R/simulation_tree_pd.R

sim_tree_pd_cppR Documentation

simulation function to simulate a tree under the pd model

Description

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

Usage

sim_tree_pd_cpp(pars, max_t, max_lin = 1e+06, max_tries = 100, useDDD = TRUE)

Arguments

pars

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

max_t

crown age

max_lin

number of lineages past which non-extinction is assumed.

max_tries

maximum number of tries to get a non-extinct tree.

Value

list with: 1) tes - reconstructed tree, 2) tas - tree with extinct lineages, 3) L = Ltable and 4) brts - branching times of the reconstructed tree and 5) status of simulation, options 1) "extinct", 2) "too_large" or 3) "done".


franciscorichter/emphasis documentation built on Feb. 19, 2024, 7:36 p.m.