Unconstraining transformation for variance matrices.

trans_Sigma(Sigma)

itrans_Sigma(lambda)

Arguments

Sigma

Variance matrix on the regular scale.

lambda

Variance matrix on the normalized scale (see 'Details').

Value

Variance matrix on the regular or unconstrained scale (see 'Details').

Details

The unconstraining transformation of a variance matrix is the so-called log-Cholesky decomposition. Namely, the log-Cholesky decomposition of a variance matrix Sigma is a vector lambda corresponding to the upper triangular Cholesky factor, of which we take the log of the diagonal and then concatenate the non-zero elements in column-major order. The exact calculation is given by:

lambda <- chol(Sigma)
diag(lambda) <- log(diag(lambda))
lambda <- lambda[upper.tri(lambda,diag=TRUE)]

The function trans_Sigma() converts Sigma to lambda, whereas itrans_Sigma() performs the inverse transformation from lambda to Sigma.