driftMixIndVm: Drift for the mivM diffusion

View source: R/drifts.R

driftMixIndVmR Documentation

Drift for the mivM diffusion

Description

Drift for the Langevin diffusion associated to a mixture of m independent (multivariate) von Mises (mivM) of dimension p.

Usage

driftMixIndVm(x, A, M, sigma, p, expTrc = 30)

Arguments

x

matrix of size c(n, p) with the evaluation points for the drift.

A

matrix of size c(m, p) giving the strengths of the drifts.

M

matrix of size c(m, p) giving the means.

sigma

diffusion coefficient.

p

vector of length m giving the proportions. Must add to one.

expTrc

truncation for exponential: exp(x) with x <= -expTrc is set to zero. Defaults to 30.

Details

driftMixVm is more efficient for the circular case. The diffusion matrix is \sigma\bold{I}. See Section 2.2.4 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 1:10) {
  lines(x, driftMixIndVm(x = cbind(x), A = cbind(c(2, 2)),
        M = cbind(c(0, -pi + 2 * pi * i / 10)), sigma = 1, p = c(0.5, 0.5)),
        col = rainbow(10)[i])
}

# 2D
x <- seq(-pi, pi, l = 100)
plotSurface2D(x, x, f = function(x) sqrt(rowSums(driftMixIndVm(x = x,
              A = rbind(c(1, 1), c(1, 1)), M = rbind(c(1, 1), c(-1, -1)),
              sigma = 1, p = c(0.25, 0.75))^2)), fVect = TRUE)

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