Last chance! 50% off unlimited learning
Sale ends in
simm.crw(date=1:100, h = 1, r = 0,
x0=c(0,0), id="A1", burst=id,
typeII=TRUE)
POSIXct
. *Note that the time lag between two relocations
should be constant* (regular trajectories required)help(ltraj)
)help(ltraj)
)TRUE
, time recorded) or not (FALSE
, time not
recorded). See help(ltraj)
.ltraj
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
.chi
, rwrpnorm
,
simm.brown
, ltraj
,
simm.crw
, simm.mba
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)
Run the code above in your browser using DataLab