Page 1 of 1

LDL' Cholesky Decomposition

Posted: Fri Aug 11, 2017 7:13 am
by Vik_pa
Dear Tom,

I am trying to do a LDL' cholesky decomposition of a covariance matrix in RATS.

As you have mentioned in one of the previous posts that the L matrix can be computed by doing the Cholesky factor of the covariance matrix and dividing each column by its diagonal element.
But I am unable to get the diagonal D matrix for this. is this the same as diagonal of the covariance matrix?

Please help me on this.

Thanks

Re: LDL' Cholesky Decomposition

Posted: Fri Aug 11, 2017 9:24 am
by TomDoan
No. It's the square of the diagonal elements of the Cholesky factor. (It's only the diagonal element of the input matrix for the first row).

compute chol=%decomp(sigma)
compute d=%diag(%xdiag(chol).^2)
compute l=%ddivide(chol,%xdiag(chol))