LDL' Cholesky Decomposition

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
Vik_pa
Posts: 30
Joined: Wed Aug 03, 2016 3:00 am

LDL' Cholesky Decomposition

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LDL' Cholesky Decomposition

Unread post 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))
Post Reply