rMM {smam} | R Documentation |
Sampling from a Moving-Moving Process with 2 Embedded Brownian Motion
Description
A moving-moving process consists of two states: moving (large) and moving (small). The transition between the two states is modeled by an alternating renewal process, with exponentially distributed duration. An animal moves according to two Brownian motions with different volatility parameters.
Usage
rMM(time, lamM1, lamM2, sigma1, sigma2, s0, dim = 2)
Arguments
time |
time points at which observations are to be simulated |
lamM1 |
rate parameter of the exponential duration while moving1 |
lamM2 |
rate parameter of the exponential duration while moving2 |
sigma1 |
volatility parameter of the Brownian motion while moving1 |
sigma2 |
volatility parameter of the Brownian motion while moving2 |
s0 |
the state at time 0, must be one of "m1" or "m2", for moving1 and moving2, respectively |
dim |
(integer) dimension of the Brownian motion |
Value
A data.frame
whose first column is the time points and whose
other columns are coordinates of the locations.
References
Yan, J., Chen, Y., Lawrence-Apfel, K., Ortega, I. M., Pozdnyakov, V., Williams, S., and Meyer, T. (2014) A moving-resting process with an embedded Brownian motion for animal movements. Population Ecology. 56(2): 401–415.
Pozdnyakov, V., Elbroch, L., Labarga, A., Meyer, T., and Yan, J. (2017) Discretely observed Brownian motion governed by telegraph process: estimation. Methodology and Computing in Applied Probability. doi:10.1007/s11009-017-9547-6.
Examples
tgrid <- seq(0, 100, length=100)
dat <- rMM(tgrid, 1, 0.1, 1, 0.1, "m1")
plot(dat[,1], dat[,2], xlab="t", ylab="X(t)", type='l')