driftMvm: Drift for the MvM diffusion

View source: R/drifts.R

driftMvmR 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 c(n, p) with the evaluation points for the drift.

alpha

vector of length p with the strength of the drift in the diagonal (\sin terms).

mu

vector of length p with the unconditional mean of the diffusion.

A

matrix of size c(p, p) with the strength of the drift in cross terms (\cos-\sin terms). The diagonal has to be zero.

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. \Sexpr[results=rd]{tools:::Rd_expr_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)

sdetorus documentation built on Aug. 21, 2023, 1:08 a.m.

Related to driftMvm in sdetorus...