sim.punc: Simulate a punctuated time-series

Description Usage Arguments Details Value See Also Examples

Description

Simulates punctuated trait evolution with punctuations that are rapid relative to the spacing of samples. In practice, the time-series is divided into two or more segments, each of which has its own mean and variance.

Usage

1
2
3
sim.punc(ns = c(10, 10), theta = c(0, 1), omega = rep(0,
  length(theta)), nn = rep(30, sum(ns)), tt = 0:(sum(ns) - 1),
  vp = 1)

Arguments

ns

vector of the number of samples in each segment

theta

vector of means, one for each segment

omega

vector of variances, one for each segment.

nn

vector of sample sizes, one for each population

tt

vector of times (ages), one for each population

vp

phenotypic variance within each population

Details

Segments are separated by punctuations. Population means in the ith segment are drawn randomly from a normal distribution with a mean equal to ith element of theta and variance equal to the ith element of omega. The magnitudes of punctuations are determined by the differences in adjacent theta values.

Value

a paleoTS object with the simulated time-series.

See Also

fitGpunc

Examples

1
2
x <- sim.punc(ns = c(15, 15), theta = c(0,3), omega = c(0.1, 0.1))
plot(x)

paleoTS documentation built on May 2, 2019, 1:07 p.m.