simm.crw {adehabitatLT}R Documentation

Simulation of a Correlated Random Walk

Description

This function simulates a correlated random walk

Usage

simm.crw(date=1:100, h = 1, r = 0,
         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)

h

the scaling parameter for the movement length

r

The concentration parameter for wrapped normal distribution of turning angles

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

Since the seminal paper of Kareiva and Shigesada (1983), most biologists describe the trajectories of an animal with the help of two distributions: the distribution of distances between successive relocations, and the distribution of turning angles between successive moves (relative angles in the class ltraj). The CRW is built iteratively. At each step of the simulation process, the orientation of the move is drawn from a wrapped normal distribution (with concentration parameter r). The length of the move is drawn from a chi distribution, multiplied by h * sqrt(dt). h is a scale parameter (the same as in the function simm.brown(), and the distribution is multiplied by sqrt(t) to make it similar to the discretized Brownian motion if r == 0.

Value

an object of class ltraj

Note

This function requires the package CircStats.

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr
Stephane Dray dray@biomserv.univ-lyon1.fr
Manuela Royer royer@biomserv.univ-lyon1.fr
Daniel Chessel chessel@biomserv.univ-lyon1.fr

References

Kareiva, P. M. & Shigesada, N. (1983) Analysing insect movement as a correlated random walk. Oecologia, 56: 234–238.

See Also

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

Examples


suppressWarnings(RNGversion("3.5.0"))
set.seed(876)
u <- simm.crw(1:500, r = 0.99, burst = "r = 0.99")
v <- simm.crw(1:500, r = 0.9, burst = "r = 0.9", h = 2)
w <- simm.crw(1:500, r = 0.6, burst = "r = 0.6", h = 5)
x <- simm.crw(1:500, r = 0, burst = "r = 0 (Uncorrelated random walk)",
              h = 0.1)
z <- c(u, v, w, x)
plot(z, addpoints = FALSE, perani = FALSE)


[Package adehabitatLT version 0.3.27 Index]