simm.levy: Simulates a Levy Walk

simm.levyR Documentation

Simulates a Levy Walk

Description

This function simulates a Levy walk

Usage

simm.levy(date = 1:500, mu = 2, l0 = 1, x0 = c(0, 0),
          id = "A1", burst = id, typeII = TRUE,
          proj4string=CRS())

Arguments

date

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)

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 help(ltraj))

burst

a character string indicating the identity of the simulated burst (see help(ltraj))

typeII

logical. Whether the simulated trajectory should be of type II (TRUE, time recorded) or not (FALSE, time not recorded). See help(ltraj).

proj4string

a valid CRS object containing the projection information (see ?CRS from the package sp).

Details

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))))

Value

an object of class ltraj

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

References

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.

See Also

chi, rwrpnorm, simm.brown, ltraj, simm.crw, simm.mba, simm.levy

Examples


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)


adehabitatLT documentation built on Sept. 11, 2024, 7:15 p.m.