View source: R/simulate_models.R
Simulate Continuous Traits on a Phylogeny
1 2 | prl_sim_traits_continuous(x, family = c("gaussian"), n_trait = 1,
root_value = 0, initial_rate = 2, tau = 5, sd = 0.25)
|
x |
Object to be simulated from. Can be either a |
family |
What error structure to use in the simulations? Can be a character vector of length |
n_trait |
Number of traits to simulate. |
root_value |
A vector of root values for each trait. Will be recycled to length |
initial_rate |
Vector of standard deviations for initial rates. Rate at which traits are diverging after first split (will
be drawn from a normal distribution with |
tau |
A vector tau values. This parameter controls the degree to which trait evolution rates change at
phylogeny nodes. Rate changes are sampled from a gaussian distribution with mean zero and sd equal to tau,
scaled by the edge length of the parent edge. Will be recycled to length |
sd |
Gaussian error of final tip-level observations. Standard deviation of noise added to tip-level
trait values. Only used if |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.