sim.accel_decel: Simulate time-series where the rate of evolution increase or...

sim.accel_decelR Documentation

Simulate time-series where the rate of evolution increase or decrease with time

Description

Simulate the evolution of a trait according to a random walk where where the rate of evolution increase or decrease with time.

Usage

sim.accel_decel(ns = 20, r = -5, vs = 0.1, vp = 0.01,
  nn = rep(20, ns), tt = 0:(ns - 1)/ns)

Arguments

ns

number of samples in time-series

r

parameter describing the decreasing/increasing rate of change through time.

vs

variance of the step distribution.

vp

within-population trait variance.

nn

vector of the number of individuals in each sample

tt

vector of sample ages, increases from oldest to youngest

Details

The function simulate the evolution of a trait where the rate of evolution increase or decrease with time: The trait evolves accoridng to a random walk where the rate of evolution show either an exponential increase or decrease with time. See reference below for details on the model.

Value

First part of the output summarizes the number of iterations in the parametric bootstrap and the confidence level for judging whether a model is an adequate statistical description of the data. The last part of the output is a data frame with the adequacy tests as columns and the following rows:

A paleoTS object.

Author(s)

Kjetil L. Voje

References

Harmon, L. J., J. B. Losos, T. J. Davies, R. G. Gillespie, J. L. Gittleman, W. B. Jennings, K. H. Kozak, et al. 2010. Early bursts of body size and shape evolution are rare in comparative data. Evolution 64:2385–2396.

Examples

## generate a paleoTS objects by simulating a trait that shows an increasing rate of evolution with time. 
x <- sim.accel_decel(ns=20, r=-1, vs=0.1)

## Investigate if the time series pass all thee adequacy tests
fit3adequacy.accel(x)


klvoje/adePEM documentation built on Feb. 24, 2023, 1:28 p.m.