simulate_traits | R Documentation |
Function to simulate continuous trait value histories on a phylogeny.
simulate_traits(
phy,
rate_model = c("continuous", "discrete"),
temp_trend_rates = 0,
rate_change,
rates = NULL,
anc = c(`1` = 0),
internal = FALSE,
nsim = 1,
pos_strat = c("none", "log", "add_const"),
temp_trend_mean = 0
)
phy |
A phylogenetic tree (phylo object) on which to simulate traits |
rate_model |
The type of rate model for how rates of evolution evolve on the phylogeny: "continuous" for continuous Brownian motion evolution of rates, or "discrete" for evolution of rate "classes" across the phylogeny, using an mk model. |
temp_trend_rates |
What temporal trend in rates should there be? A positive number for an increase, and negative number for a decrease with the magnitude controlling the strength of linear change. This trend is added to rates simulated under the rate_model. |
rate_change |
If |
rates |
Only used if |
anc |
Value of the trait at the root ancestor. For |
internal |
Logical value. If |
nsim |
Number of simulation to run. |
pos_strat |
? |
temp_trend_mean |
A temporal trend in rates. |
A vector or matrix (for nsim > 1
) containing simulated trait values
for each tip if internal = FALSE
, or for each node if internal = TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.