driftMvm {sdetorus} | R Documentation |
Drift for the MvM diffusion
Description
Drift for the Langevin diffusion associated to the Multivariate
von Mises (MvM) in dimension p
.
Usage
driftMvm(x, alpha, mu, A = 0)
Arguments
x |
matrix of size |
alpha |
vector of length |
mu |
vector of length |
A |
matrix of size |
Details
See Section 2.2.1 in García-Portugués et al. (2019) for details.
Value
A matrix of the same size as x
containing the drift.
References
García-Portugués, E., Sørensen, M., Mardia, K. V. and Hamelryck, T. (2019) Langevin diffusions on the torus: estimation and applications. Statistics and Computing, 29(2):1–22. doi:10.1007/s11222-017-9790-2
Examples
# 1D
x <- seq(-pi, pi, l = 200)
plot(x, x, type = "n", ylab = "drift")
for (i in 0:20) {
lines(x, driftMvm(x = x, alpha = 3 * i / 20, mu = 0, A = 0),
col = rainbow(21)[i + 1])
}
# 2D
x <- seq(-pi, pi, l = 100)
plotSurface2D(x, x, f = function(x) sqrt(rowSums(driftMvm(x = x,
alpha = c(2, 2), mu = c(-1, -1),
A = rbind(c(0, 0), c(0, 0)))^2)),
fVect = TRUE)
[Package sdetorus version 0.1.10 Index]