dTpdWou: Conditional probability density of the WOU process

View source: R/WOU.R

dTpdWouR Documentation

Conditional probability density of the WOU process

Description

Conditional probability density of the Wrapped Ornstein–Uhlenbeck (WOU) process.

Usage

dTpdWou(x, t, A, mu, Sigma, x0, maxK = 2, eigA = NULL, invASigma = NULL)

Arguments

x

matrix of size c(n, p) with the evaluation points in [-\pi,\pi)^p.

t

a scalar containing the times separating x and x0.

A

matrix of size c(p, p) giving the drift strength.

mu

mean parameter. Must be in [\pi,\pi).

Sigma

diffusion matrix, of size c(p, p).

x0

vector of length p with the initial point in [-\pi,\pi)^p.

maxK

maximum absolute value of the windings considered in the computation of the WN.

eigA

optional argument containing eigen(A) for reuse.

invASigma

the matrix solve(Sigma) %*% A (optional).

Details

See Section 3.3 in García-Portugués et al. (2019) for details. dTpdWou1D and dTpdWou2D are more efficient implementations for the 1D and 2D cases, respectively.

Value

A vector of length n with the density evaluated at x.

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
t <- 0.5
alpha <- 1
mu <- 0
sigma <- 1
x0 <- pi
x <- seq(-pi, pi, l = 10)
dTpdWou(x = cbind(x), x0 = x0, t = t, A = alpha, mu = 0, Sigma = sigma^2) -
dTpdWou1D(x = cbind(x), x0 = rep(x0, 10), t = t, alpha = alpha, mu = 0,
          sigma = sigma)

# 2D
t <- 0.5
alpha <- c(2, 1, -1)
sigma <- c(1.5, 2)
rho <- 0.9
Sigma <- diag(sigma^2)
Sigma[1, 2] <- Sigma[2, 1] <- rho * prod(sigma)
A <- alphaToA(alpha = alpha, sigma = sigma, rho = rho)
mu <- c(pi, 0)
x0 <- c(0, 0)
x <- seq(-pi, pi, l = 5)
x <- as.matrix(expand.grid(x, x))
dTpdWou(x = x, x0 = x0, t = t, A = A, mu = mu, Sigma = Sigma) -
dTpdWou2D(x = x, x0 = rbind(x0), t = t, alpha = alpha, mu = mu,
          sigma = sigma, rho = rho)

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

Related to dTpdWou in sdetorus...