kinship
package that can be found at http://cran.r-project.org/web/packages/kinship/index.html.gchol(x, tolerance=1e-10)
gchol
containing the
generalized Cholesky decompostion.
It has the appearance of a lower triangular matrix.The main advantage of the generalized form is that it admits
of matrices that are not of full rank: D will contain zeros
marking the redundant columns, and the rank of A is the
number of non-zero columns. If all elements of D are zero or
positive, then A is a non-negative definite (NND) matrix.
The generalized form also has the (quite minor) numerical advantage
of not requiring square roots during its calculation.
To extract the components of the decompostion, use the
diag
and as.matrix
functions.
The solve
has a method for gchol decompostions,
and there are gchol methods for block diagonal symmetric
(bdsmatrix
) matrices as well.