sim.OU: Simulate an Ornstein-Uhlenbeck time-series

sim.OUR Documentation

Simulate an Ornstein-Uhlenbeck time-series

Description

Simulate an Ornstein-Uhlenbeck time-series

Usage

sim.OU(
  ns = 20,
  anc = 0,
  theta = 10,
  alpha = 0.3,
  vstep = 0.1,
  vp = 1,
  nn = rep(20, ns),
  tt = 0:(ns - 1)
)

Arguments

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)

Details

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.

Value

a paleoTS object

References

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.

See Also

opt.joint.OU

Examples

x1 <- sim.OU(alpha = 0.8)  # strong alpha
x2 <- sim.OU(alpha = 0.1)  # wearker alpha
plot(x1)
plot(x2, add = TRUE, col = "blue")


paleoTS documentation built on Aug. 9, 2022, 1:06 a.m.