sim.sgs | R Documentation |
This function simulates a punctuated change that is is protracted enough that it is captured by multiple transitional populations. Trait evolution starts in stasis, shifts to a general random walk, and then shifts back into stasis.
sim.sgs(
ns = c(20, 20, 20),
theta = 0,
omega = 1,
ms = 1,
vs = 0.1,
nn = rep(30, sum(ns)),
tt = 0:(sum(ns) - 1),
vp = 1
)
ns |
vector with the number of samples in each segment |
theta |
trait mean for initial stasis segment |
omega |
trait variance for stasis segments |
ms |
step mean during random walk segment |
vs |
step variance during random walk segment |
nn |
vector of sample sizes for each population |
tt |
vector of times (ages) for each population |
vp |
phenotypic trait variance for each population |
Trait evolution proceeds in three segments: Stasis, General random walk, stasis (sgs).
The initial stasis segment has a mean of theta
and variance omega
before
shifting in the second segment to a general random walk with parameters ms
and
vs
. Finally, the third segment is a return to stasis, centered around the trait value
of the last population of the random walk.
a paleoTS
object
x <- sim.sgs() # default values OK
plot(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.