optim_base_rate: Adjust average rate under budding speciation

Description Usage Arguments Value

View source: R/optim_base_rate.R

Description

Budding speciation combined with lineage-age dependent trait evolution will cause the rates of trait evolution to vary across the branches of the tree. This function allows one to adjust the base rate used to simulate traits given a target average rate. This function requires the previous usage of ‘sim_Mk_budding_exp’, ‘sim_Mk_trace_history’, ‘sim_BM_budding_exp’, or ‘sim_BM_trace_history’. It is useful to create multiple scenarios of trait evolution while making sure that the average rate across the branch of the tree remains the same.

Usage

1
optim_base_rate(sim, target_mean_rate)

Arguments

sim

the output from ‘sim_Mk_budding_exp’, ‘sim_Mk_trace_history’, ‘sim_BM_budding_exp’, or ‘sim_BM_trace_history’

target_mean_rate

a numeric value. The target average rate of trait evolution. For discrete traits, this is the equal rates model (ER).

Value

The base rate parameter which will produce the target average rate.


Caetanods/buddPhy documentation built on Oct. 12, 2021, 12:14 p.m.