[R] Determinant and inverse using cholsky parameter

Kjetil Halvorsen kjetilbrinchmannhalvorsen at gmail.com
Fri Jun 8 16:59:15 CEST 2012


On Fri, Jun 8, 2012 at 10:08 AM, Özgür Asar <oasar at metu.edu.tr> wrote:
> Hi,
>
> Isn't the Cholesky decomposition of A=L (L)^T where T stands for "transpose"
> and L is the Cholesky factor of A.
>
> You say you have the  Cholesky decomposition, isn't it L (above)?
>
> A<-L%*%t(L)
> det(A)
> solve(A)
>
> would be your answer.

A better answer would be to use that L is an (upper or lower, doesn't
matter) triangular matrix,
so the determinant is just the product of the diagonal elements, so
det(A) is just prod(diag(L))^2.

kjetil

>
> Hope this helps
> Ozgur
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Determinant-and-inverse-using-cholsky-parameter-tp4632769p4632808.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list