driftWn2D {sdetorus} | R Documentation |
Drift of the WN diffusion in 2D
Description
Computes the drift of the WN diffusion in 2D in a vectorized way.
Usage
driftWn2D(x, A, mu, sigma, rho = 0, maxK = 2L, expTrc = 30)
Arguments
x |
a matrix of dimension |
A |
drift matrix of size |
mu |
a vector of length |
sigma |
vector of length |
rho |
correlation coefficient of |
maxK |
maximum absolute value of the windings considered in the computation of the WN. |
expTrc |
truncation for exponential: |
Value
A matrix of size c(n, 2)
containing the drift evaluated at x
.
Examples
alpha <- 3:1
mu <- c(0, 0)
sigma <- 1:2
rho <- 0.5
Sigma <- diag(sigma^2)
Sigma[1, 2] <- Sigma[2, 1] <- rho * prod(sigma)
A <- alphaToA(alpha = alpha, sigma = sigma, rho = rho)
x <- rbind(c(0, 1), c(1, 0.1), c(pi, pi), c(-pi, -pi), c(pi / 2, 0))
driftWn2D(x = x, A = A, mu = mu, sigma = sigma, rho = rho)
driftWn(x = x, A = A, mu = c(0, 0), Sigma = Sigma)
[Package sdetorus version 0.1.10 Index]