Simulates a (continuous time) random walk as a Brownian drift. For mu = 0
the random walk is unbiased, otherwise it is biased.
Value
A list with elements t
and y
. t
is a duplicate of the input parameter and is the times at which the random walk is evaluated. y
are the values of the random walk at said times. Output list is of S3 class timelist
(inherits from list
) and can thus be plotted directly using plot
, see ?admtools::plot.timelist
See also
stasis()
andornstein_uhlenbeck()
to simulate other modes of evolutionrandom_walk_sl()
to simulate random walk on specimen level - for usage in conjunction with thepaleoTS
package
Examples
library("admtools") # required for plotting of results
t = seq(0, 1, by = 0.01)
l = random_walk(t, sigma = 3) # high variability, no direction
plot(l, type = "l")
l2 = random_walk(t, mu = 1) # low variabliity, increasing trend
lines(l2$t, l2$y, col = "red")