sim.sgs: Simulate protracted punctuation

sim.sgsR Documentation

Simulate protracted punctuation

Description

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.

Usage

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
)

Arguments

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

Details

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.

Value

a paleoTS object

Examples

x <- sim.sgs()  # default values OK
plot(x)

paleoTS documentation built on Sept. 11, 2024, 9:18 p.m.