sim.OU | R Documentation |
Simulate an Ornstein-Uhlenbeck time-series
sim.OU(
ns = 20,
anc = 0,
theta = 10,
alpha = 0.3,
vstep = 0.1,
vp = 1,
nn = rep(20, ns),
tt = 0:(ns - 1)
)
ns |
number of populations in the sequence |
anc |
ancestral phenotype |
theta |
OU optimum (long-term mean) |
alpha |
strength of attraction to the optimum |
vstep |
step variance |
vp |
phenotypic variance of each sample |
nn |
vector of sample sizes |
tt |
vector of sample times (ages) |
This function simulates an Ornstein-Uhlenbeck (OU) process. In
microevolutionary terms, this models a population ascending a nearby peak
in the adaptive landscape. The optimal trait value is theta
,
alpha
indicates the strength of attraction to that peak (= strength
of stabilizing selection around theta
), vstep
measures the
random walk component (from genetic drift) and anc
is the trait
value at the start of the sequence.
a paleoTS
object
Hunt, G., M. A. Bell and M. P. Travis. 2008. Evolution toward a new adaptive optimum: phenotypic evolution in a fossil stickleback lineage. Evolution 62(3): 700-710.
opt.joint.OU
x1 <- sim.OU(alpha = 0.8) # strong alpha
x2 <- sim.OU(alpha = 0.1) # weaker alpha
plot(x1)
plot(x2, add = TRUE, col = "blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.