mleMou: Maximum likelihood estimation of the multivariate OU...

View source: R/OU.R

mleMouR Documentation

Maximum likelihood estimation of the multivariate OU diffusion

Description

Computation of the maximum likelihood estimator of the parameters of the multivariate Ornstein–Uhlenbeck (OU) diffusion from a discretized trajectory \{X_{\Delta i}\}_{i=1}^N. The objective function to minimize is

\sum_{i=2}^n\log p_{\Delta}(X_{\Delta i} | X_{\Delta (i - 1)}).

Usage

mleMou(data, delta, alpha = rep(NA, 3), mu = rep(NA, 2), sigma = rep(NA,
  2), start, lower = c(0.01, 0.01, -25, -pi, -pi, 0.01, 0.01),
  upper = c(25, 25, 25, pi, pi, 25, 25), ...)

Arguments

data

a matrix of size c(N, p) with the discretized trajectory of the diffusion.

delta

time discretization step.

alpha, mu, sigma

arguments to fix a parameter to a given value and perform the estimation on the rest. Defaults to NA, meaning that the parameter is estimated. Note that start, lower and upper must be changed accordingly if parameters are fixed, see examples.

start

starting values, a matrix with p columns, with each entry representing a different starting value.

lower, upper

bound for box constraints as in method "L-BFGS-B" of optim.

...

further arguments to be passed to mleOptimWrapper.

Details

The first row in data is not taken into account for estimation. See mleOu for the univariate case (more efficient).

mleMou only handles p = 2 currently. It imposes that Sigma is diagonal and handles the parametrization of A by alphaToA.

Value

Output from mleOptimWrapper.

Examples

set.seed(345678)
data <- rTrajMou(x0 = c(0, 0), A = alphaToA(alpha = c(1, 1, 0.5),
                                            sigma = 1:2), mu = c(1, 1),
                 Sigma = diag((1:2)^2), N = 200, delta = 0.5)
mleMou(data = data, delta = 0.5, start = c(1, 1, 0, 1, 1, 1, 2),
       lower = c(0.1, 0.1, -25, -10, -10, 0.1, 0.1),
       upper = c(25, 25, 25, 10, 10, 25, 25), maxit = 500)

# Fixed sigma and mu
mleMou(data = data, delta = 0.5, mu = c(1, 1), sigma = 1:2,
       start = c(1, 1, 0), lower = c(0.1, 0.1, -25), upper = c(25, 25, 25))

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

Related to mleMou in sdetorus...