cov2theta {epigrowthfit} | R Documentation |
Compute a Packed Representation of a Covariance Matrix
Description
Transform covariances matrices to a “packed” representation or compute the inverse transformation.
Usage
cov2theta(Sigma)
theta2cov(theta)
Arguments
Sigma |
an |
theta |
a numeric vector of length |
Details
An -by-
real, symmetric, positive definite matrix
can be factorized as
The upper triangular Cholesky factor can be written as
where
is a unit upper triangular matrix and
and
are diagonal matrices.
cov2theta
takes and returns the vector
of length
containing the log diagonal entries
of
followed by (in column-major order) the strictly
upper triangular entries of
.
theta2cov
computes the
inverse transformation.
Value
A vector like theta
(cov2theta
) or a matrix like
Sigma
(theta2cov
); see ‘Details’.