log_chol {mmcif}R Documentation

Computes the Log Cholesky Decomposition and the Inverse

Description

Computes the log Cholesky decomposition and the inverse of it. The functions are provided as the log Cholesky decomposition is used in the parameterization of the covariance matrix.

Usage

log_chol(x)

log_chol_inv(x)

Arguments

x

A positive definite matrix or a vector with a log Cholesky decomposition.

Value

A numeric vector with the log Cholesky decomposition or a matrix with the inverse.

Examples

set.seed(1)
S <- drop(rWishart(1, 10, diag(10)))
log_chol(S)
stopifnot(isTRUE(all.equal(S, log_chol_inv(log_chol(S)))),
          (NCOL(S) * (NCOL(S) + 1L)) %/% 2L == length(log_chol(S)))


[Package mmcif version 0.1.1 Index]