[R] LDL' Cholesky decomposition
Terry Therneau
therneau at mayo.edu
Wed Mar 11 14:55:46 CET 2009
The gchol function in library(kinship) does an LDL decomposition. An updated
version has just recently been posted on Rforge, in the bdsmatrix library which
is part of survival.
> temp <- matrix(c(1,1,1,1,5,8,1,8,14), 3)
> gt <- gchol(temp)
> as.matrix(gt) # L
[,1] [,2] [,3]
[1,] 1 0.00 0
[2,] 1 1.00 0
[3,] 1 1.75 1
> diag(gt) # D
[1] 1.00 4.00 0.75
Terry Therneau
More information about the R-help
mailing list