Description Usage Arguments Value
View source: R/simulate_rate_decay.R
Simulate the expected amount of trait evolution under lineage-age dependent decay of rates
1 2 3 4 5 6 7 8 | simulate_rate_decay(
change_rate,
start_rate = NULL,
time_elapsed,
plot = TRUE,
npoints = 10,
nsims = 1000
)
|
change_rate |
Numeric. The factor of exponential decay of rates in function of the age of the lineage. |
start_rate |
NULL or Numeric or matrix. If NULL, the function returns the fator of rate decay in function of the age of the lineage. If numeric or matrix, it represents the rate of trait evolution at the start of the simulation (lineage age of 0.0 My). If a single numeric number, the function assumes a Brownian Motion process. If a matrix, the model assumes it is a transition matrix (Q) for a discrete trait Markovian process. |
time_elapsed |
Numeric. The age of the lineage at the end of the simulation. Simulation will happen from 0.0 to 'time_elapsed' My. |
plot |
Logical. If TRUE a plot is made. |
npoints |
Integer. Number of time points to sample along the age of the lineage. |
nsims |
Integer. Number of simulation replicates used to estimate the number of expected transition events when 'start_rate' is a Q matrix. Transition events are estimated using forward simulations with the starting state randomly sampled from Q (with equal probability). |
a matrix with the information for the age and the expected amount of trait evolution at each 'npoints' time point.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.