Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simm.mba

Simulation of an Arithmetic Brownian Motion


Description

This function simulates an Arithmetic Brownian Motion.

Usage

simm.mba(date = 1:100, x0 = c(0, 0), mu = c(0, 0),
         sigma = diag(2), id = "A1", burst = id,
         proj4string=CRS())

Arguments

date

a vector indicating the date (in seconds) at which relocations should be simulated. This vector can be of class POSIXct

x0

a vector of length 2 containing the coordinates of the startpoint of the trajectory

mu

a vector of length 2 describing the drift of the movement

sigma

a 2*2 positive definite matrix

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

proj4string

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

Details

The arithmetic Brownian motion (Brillinger et al. 2002) can be described by the stochastic differential equation:

dz = mu * dt + Sigma dB2(t)

Coordinates of the animal at time t are contained in the vector z(t). dz = c(dx, dy) is the increment of the movement during dt. dB2(t) is a bivariate brownian Motion (see ?simm.brown). The vector mu measures the drift of the motion. The matrix Sigma controls for perturbations due to the random noise modeled by the Brownian motion. It can also be used to take into account a potential correlation between the components dx and dy of the animal moves during dt (see Examples).

Value

An object of class ltraj

Author(s)

References

Brillinger, D.R., Preisler, H.K., Ager, A.A. Kie, J.G. & Stewart, B.S. (2002) Employing stochastic differential equations to model wildlife motion. Bulletin of the Brazilian Mathematical Society 33: 385–408.

See Also

Examples

suppressWarnings(RNGversion("3.5.0"))
set.seed(253)
u <- simm.mba(1:1000, sigma = diag(c(4,4)), 
              burst = "Brownian motion")
v <- simm.mba(1:1000, sigma = matrix(c(2,-0.8,-0.8,2), ncol = 2),
              burst = "cov(x,y) > 0")
w <- simm.mba(1:1000, mu = c(0.1,0), burst = "drift > 0")
x <- simm.mba(1:1000, mu = c(0.1,0),
              sigma = matrix(c(2, -0.8, -0.8, 2), ncol=2),
              burst = "Drift and cov(x,y) > 0")
z <- c(u, v, w, x)
plot(z, addpoints = FALSE, perani = FALSE)

adehabitatLT

Analysis of Animal Movements

v0.3.25
GPL (>= 2)
Authors
Clement Calenge, contributions from Stephane Dray and Manuela Royer
Initial release
2020-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.