Re: [R] Efficient matrix computations

2009-02-17 Thread Shimrit Abraham
Thanks for your suggestions. I'll try to implement what you suggested. Perhaps the following information can help you to think of alternative ways to speed up computations: I am coding the Kalman Filter in R because I have certain requirements that are not provided by the packages regarding Stat

Re: [R] Efficient matrix computations

2009-02-17 Thread Dimitris Rizopoulos
sorry, in my previous e-mail it should be tcrossprod() # and prod(eigen(mat, symmetric = TRUE, only.values = TRUE)$values) Best, Dimitris Shimrit Abraham wrote: Hi, I am looking for two ways to speed up my computations: 1. Is there a function that efficiently computes the 'sandwich product'

Re: [R] Efficient matrix computations

2009-02-17 Thread Dimitris Rizopoulos
it would be a bit more helpful if we knew more info regarding these matrices, for instance is P diagonal, etc. In any case, you could have a look at crossprod() # and tcorssprod() and, for the determinant maybe prod(eigen(mat, symmetric = TRUE, only.values = FALSE)$values) # or prod(diag(chol

[R] Efficient matrix computations

2009-02-17 Thread Shimrit Abraham
Hi, I am looking for two ways to speed up my computations: 1. Is there a function that efficiently computes the 'sandwich product' of three matrices, say, ZPZ' 2. Is there a function that efficiently computes the determinant of a positive definite symmetric matrix? Thanks, S.A. [[alter