[R] Matrix mulitplication
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Feb 17 00:35:03 CET 2004
(Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> writes:
> Sorry! Missed a trick here:
>
> At <- t(A)
> Bt <- t(B)
> E <- B%*%A
> Et <- t(E)
> A%*%solve(Et%*%E + C)%*%Et%*%D
>
> (saves 2 multiplications at the relatively cheap cost of 1 transpose)
Well, you might consider getting rid of the first two transposes since
you're not actually using them for anything....
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list