simm.levy | R Documentation |
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())
date |
a vector indicating the date (in seconds) at which
relocations should be simulated. This vector can be of class
|
mu |
The exponent of the Levy distribution |
l0 |
The minimum length of a step |
x0 |
a vector of length 2 containing the coordinates of the startpoint of the trajectory |
id |
a character string indicating the identity of the simulated
animal (see |
burst |
a character string indicating the identity of the simulated
burst (see |
typeII |
logical. Whether the simulated trajectory should be of
type II ( |
proj4string |
a valid CRS object containing the projection
information (see |
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))))
an object of class ltraj
Clement Calenge clement.calenge@ofb.gouv.fr
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.