| rStatWn2D | R Documentation | 
Simulates from the stationary density of the WN diffusion in 2D.
rStatWn2D(n, mu, alpha, sigma, rho = 0)
| n | sample size. | 
| mu | a vector of length  | 
| alpha | vector of length  | 
| sigma | vector of length  | 
| rho | correlation coefficient of  | 
A matrix of dimension c(n, 2) containing the samples from the stationary distribution.
set.seed(345567)
alpha <- c(2, 1, -1)
sigma <- c(1.5, 2)
Sigma <- diag(sigma^2)
A <- alphaToA(alpha = alpha, sigma = sigma)
mu <- c(pi, pi)
plot(rStatWn2D(n = 1000, mu = mu, alpha = alpha, sigma = sigma))
points(toPiInt(mvtnorm::rmvnorm(n = 1000, mean = mu,
                                sigma = solve(A) %*% Sigma / 2,
                                method = "chol")), col = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.