[R] Determinant and inverse using cholsky parameter

peter dalgaard pdalgd at gmail.com
Fri Jun 8 16:46:14 CEST 2012


On Jun 8, 2012, at 16:08 , Özgür Asar 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.

The standard trick is to work directly with L. This is triangular, so the determinant is the product of the diagonal, and the determinant of A is the square of that. 

Similarly, you can use backsolve to find the inverse of L and multiply it with its transpose for the inverse of A.


> 
> 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.

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list