Last chance! 50% off unlimited learning
Sale ends in
This function simulates a Levy walk
simm.levy(date = 1:500, mu = 2, l0 = 1, x0 = c(0, 0),
id = "A1", burst = id, typeII = TRUE,
proj4string=CRS())
an object of class ltraj
a vector indicating the date (in seconds) at which
relocations should be simulated. This vector can be of class
POSIXct
. *Note that the time lag between two relocations
should be constant* (regular trajectories required)
The exponent of the Levy distribution
The minimum length of a step
a vector of length 2 containing the coordinates of the startpoint of the trajectory
a character string indicating the identity of the simulated
animal (see help(ltraj)
)
a character string indicating the identity of the simulated
burst (see help(ltraj)
)
logical. Whether the simulated trajectory should be of
type II (TRUE
, time recorded) or not (FALSE
, time not
recorded). See help(ltraj)
.
a valid CRS object containing the projection
information (see ?CRS
from the package sp
).
Clement Calenge clement.calenge@ofb.gouv.fr
This function simulates a Levy flight with exponent mu
.
This is done by sampling a random relative angle from a uniform
distribution (-pi, pi) for each step, and a step length generated by
dt * (l0 * (runif(1)^(1/(1 - mu))))
Bartumeus, F., da Luz, M.G.E., Viswanathan, G.M. Catalan, J. (2005) Animal search strategies: a quantitative random-walk analysis. Ecology, 86: 3078--3087.
chi
, rwrpnorm
,
simm.brown
, ltraj
,
simm.crw
, simm.mba
,
simm.levy
suppressWarnings(RNGversion("3.5.0"))
set.seed(411)
w <- simm.levy(1:500, mu = 1.5, burst = "mu = 1.5")
u <- simm.levy(1:500, mu = 2, burst = "mu = 2")
v <- simm.levy(1:500, mu = 2.5, burst = "mu = 2.5")
x <- simm.levy(1:500, mu = 3, burst = "mu = 3")
par(mfrow=c(2,2))
lapply(list(w,u,v,x), plot, perani=FALSE)
Run the code above in your browser using DataLab