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
LDL' Cholesky Decomposition
Re: LDL' Cholesky Decomposition
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))
compute chol=%decomp(sigma)
compute d=%diag(%xdiag(chol).^2)
compute l=%ddivide(chol,%xdiag(chol))