search_tree: Function to search for trees with a given number of tips and...

View source: R/edd_rtree.R

search_treeR Documentation

Function to search for trees with a given number of tips and a given parameter set

Description

Function to search for trees with a given number of tips and a given parameter set

Usage

search_tree(
  pars,
  age,
  model,
  metric,
  offset,
  size = NULL,
  n = 1,
  history = FALSE,
  verbose = FALSE,
  size_limit = 1e+06
)

Arguments

pars

Vector of parameters:

pars[1] corresponds to lambda (speciation rate)
pars[2] corresponds to mu (extinction rate)
pars[3] corresponds to beta_num (coefficient for species number effect on speciation)
pars[4] corresponds to beta_phi (coefficient for evolutionary distinctiveness effect on speciation)
pars[5] corresponds to gamma_num (coefficient for species number effect on speciation)
pars[6] corresponds to gamma_phi (coefficient for evolutionary distinctiveness effect on extinction)

age

Sets the crown age for the simulation

model

Sets the model of diversity-dependence:
model == dsce2 : linear dependence in speciation rate with parameters beta_num and beta-phi
model == dsde2 : linear dependence in both speciation rate and extinction rate with parameters beta_num, beta_phi, gamma_num and gamma_phi

metric

"pd" , "ed" or "nnd", Specifies which evolutionary distinctiveness metric should be used.

offset

Specifies which method to use to offset the impact of tree age and the collinearity between pd and species richness. "none" for no offset method; "simtime" for deducting tree age from pd value; "spcount" for dividing pd value by species richness; "both" for applying both "simtime" and "spcount", by firstly deducting tree age and then dividing by species richness

size

Specifies the number of tips in the tree to be searched for

n

Specifies the number of trees to be searched for

history

Logical, indicating whether to record the historical states (of the rates and ED/PD values)

verbose

Logical, for debugging purpose, indicating whether to print simulation info at each step in the console, and save running time to a file

size_limit

Specifies the maximum number of tips in the tree to be

converter

Either "cpp" or "r", choose which version of L2phylo to use.

Value

a list of trees

Author(s)

Tianjian Qin


EvoLandEco/eve documentation built on Sept. 14, 2024, 12:04 a.m.