sim.accel.decel {evoTS} | R Documentation |
Simulate an Unbiased Random Walk with an accelerating or decelerating rate of change through time.
Description
Function to simulate an evolutionary sequence data set according to an Unbiased Random Walk with an accelerating or decelerating rate of change through time.
Usage
sim.accel.decel(
ns = 20,
vs = 0.5,
r = 0.2,
vp = 0.2,
nn = rep(20, ns),
tt = 0:(ns - 1)
)
Arguments
ns |
number of samples in time-series |
vs |
step variance of the trait |
r |
the parameter controlling the exponential decay (if negative) or increase (if positive) of the rate (vs) through time. |
vp |
phenotypic variance of each sample |
nn |
vector of the number of individuals in each sample (identical sample sizes for all time-series is assumed) |
tt |
vector of sample times (ages |
Value
An evolutionary sequence (time-series) data set (a paleoTS object)
Author(s)
Kjetil Lysne Voje
Examples
##Simulate an unbiased random walk where the rate decelerates through time.
x<-sim.accel.decel(40, r=-0.5)
## Plot the data
plotevoTS(x)
[Package evoTS version 1.0.3 Index]