Skip to content
Back to formatted view

Raw Message

Message-ID: <200903111355.n2BDtkg04135@hsrnfs-101.mayo.edu>
Date: 2009-03-11T13:55:46Z
From: Terry Therneau
Subject: LDL' Cholesky decomposition

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