On Wed, 1 Nov 2006, Fabian Scheipl wrote:
>
> Calculating the smoother/projection matrix S: y -> \hat y and then its
> trace by sum(eigen(S))$values is what I've been doing so far- but I was
> hoping there might be a more efficient way than doing the spectral
> decomposition of an NxN-matrix.
>
Well, there are more efficient ways to compute the trace of a matrix than
spectral decomposition. The trace is just the sum of the diagonal
elements: sum(diag(S))
-thomas
______________________________________________
[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.