approxMleWnPairs {sdetorus} | R Documentation |
Approximate MLE of the WN diffusion in 2D from a sample of initial and final pairs of angles.
Description
Approximate Maximum Likelihood Estimation (MLE) for the Wrapped Normal (WN) diffusion, using the wrapped Ornstein–Uhlenbeck diffusion and assuming initial stationarity.
Usage
approxMleWnPairs(data, delta, start = c(0, 0, 1, 1, 0, 1, 1),
alpha = rep(NA, 3), mu = rep(NA, 2), sigma = rep(NA, 2), rho = NA,
lower = c(-pi, -pi, 0.01, 0.01, -25, 0.01, 0.01, -0.99), upper = c(pi,
pi, 25, 25, 25, 25, 25, 0.99), maxK = 2, expTrc = 30, ...)
Arguments
data |
a matrix of dimension |
delta |
discretization step. |
start |
starting values, a matrix with |
alpha |
vector of length |
mu |
a vector of length |
sigma |
vector of length |
rho |
correlation coefficient of |
lower , upper |
bound for box constraints as in method |
maxK |
maximum absolute value of the windings considered in the computation of the WN. |
expTrc |
truncation for exponential: |
... |
further parameters passed to |
Value
Output from mleOptimWrapper
.
Examples
mu <- c(0, 0)
alpha <- c(1, 2, 0.5)
sigma <- c(1, 1)
rho <- 0.5
set.seed(4567345)
begin <- rStatWn2D(n = 200, mu = mu, alpha = alpha, sigma = sigma)
end <- t(apply(begin, 1, function(x) rTrajWn2D(x0 = x, alpha = alpha,
mu = mu, sigma = sigma,
rho = rho, N = 1,
delta = 0.1)[2, ]))
data <- cbind(begin, end)
approxMleWnPairs(data = data, delta = 0.1,
start = c(2, pi/2, 2, 0.5, 0, 2, 1, 0.5))