oupar {glinvci}R Documentation

Parameterisation functions of Ornstein-Uhlenbeck model

Description

oupar is a function that maps from the Ornstein-Uhlenbeck model parameters to the Gaussian parametersation.

oujac accepts the same arguments as oupar and returns the Jacobian matrix of oupar.

ouhess accepts the same arguments as oupar and returns all the second derivatives oupar. The returned values are consistent with the format required by glinv.

Usage

oupar(par, t, ...)

oujac(par, t, ...)

ouhess(par, t, ...)

Arguments

par

A numeric vector containing the joint vector of the Ornstein-Uhlenbeck drift matrix, long-term mean, and volitality matrix, which is a lower-triangular Cholesky factor.

t

Branch length of the currently processing node.

...

Unused in these functions. Their existence is needed because lik.glinv etc. always pass us four arguments. See lik.glinv for details.

Details

By multivariate Ornstein-Uhlenbeck process, we mean

dx(t)=H(x(t)θ)dt+ΣxdW(t)dx(t) = -H(x(t) - \theta)dt + \Sigma_x dW(t)

where HH is a kk-by-kk matrix with real entries, θ\theta is any real kk-vector, Σx\Sigma_x is a lower-triangular matrix, W(t)W(t) is the Brownian motion process. The parameters of this model is (H,θ,Σx)(H,\theta,\Sigma_x), therefore k2+k+k(k+1)/2k^2+k+k(k+1)/2 dimensional.

This package uses parameterisation (H,θ,Σx)(H,\theta,\Sigma_x'), where HH and θ\theta is the same as above defined, and Σx\Sigma_x' is the lower-triangular part of Σx\Sigma_x, except that, only on diagonal entries, Σx=log(Σx)\Sigma_x'=log(\Sigma_x). The use of logarithm is for eliminating multiple local maxima in the log-likelihood.

The par arguemnt is the concatenation of column-major-flattened HH, θ\theta, and the column-major-flattened lower-triangular part of Σx\Sigma_x'.

Value

oupar returns the a vector of concatenated (Φ,w,V)(\Phi, w, V'), where VV' is the lower triangular part of VV. oujac returns the Jacobian matrix of oupar. ouhess returns a list of three 3D arrays, named Phi, w, V respectively inside the list, in which ouhess(...)$Phi[m,i,j] contains the cross second-order partial derivative of Φm\Phi_m (here we treat the matrix Φ\Phi as a column-major-flattened vector) with respect to the ii-th andjj-th user parameters; and ouhess(...)$w[m,i,j] and ((parhess[[i]])(...))$V[m,i,j] analogously contains second-order derivative of wmw_m and VmV'_m.


[Package glinvci version 1.2.4 Index]