rxOmegaVarCovDeriv_: Variance-covariance (non-Cholesky) Omega parameterization...

View source: R/RcppExports.R

rxOmegaVarCovDeriv_R Documentation

Variance-covariance (non-Cholesky) Omega parameterization derivatives (C++)

Description

C++/RcppArmadillo implementation of the non-Cholesky Omega derivatives used to build a FOCEI/FOCE observed-information covariance over the natural variance-covariance scale. Returns \Omega^{-1}, \log|\Omega|, and their first (and optionally second) derivatives with respect to each free lower-triangular variance-covariance element \omega_{ab}, using

Usage

rxOmegaVarCovDeriv_(omega, order = 2L)

Arguments

omega

symmetric positive-definite random-effects covariance matrix.

order

integer; 1 for first derivatives only, 2 (default) to also return the second derivatives needed for the covariance Hessian.

Details

\partial \Omega^{-1}/\partial \omega_{ab} = -\Omega^{-1} E_{ab} \Omega^{-1}

\partial \log|\Omega|/\partial \omega_{ab} = \mathrm{tr}(\Omega^{-1} E_{ab})

where E_{ab} is the symmetric single-entry basis matrix.

Value

a list with omegaInv, logDet, the free-element index matrix elements (each row c(a, b), a >= b), first derivatives dOmegaInv / dLogDet, and (when order = 2) second derivatives d2OmegaInv / d2LogDet.

Author(s)

Hidde van de Beek


rxode2 documentation built on July 28, 2026, 5:08 p.m.