Dear,
I have to compute the trace of a product between four matrices. For
example, I know the matrices Wi, Wj and C, I need to compute this
-trace(Wi%*%C^-1%*%Wj%*%C^-1)
I would like to avoid compute the complete matrix and after take the
diagonal, something like
sum(diag( solve(Wi,C)%*% solve(Wj,C)))
Any idea is welcome.
Thanks
--
Wagner Hugo Bonat
LEG - Laboratório de Estatística e Geoinformação
UFPR - Universidade Federal do Paraná
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.