If you have to compute it many times for the same value of C but different values of A and B then you could use the Sherman-Morrison-Woodbury formula which expresses the inverse of C+UV' in terms of the inverse of C. This would allow you to avoid computing any inverses (except for C which only has to be done once). See:
http://mathworld.wolfram.com/WoodburyFormula.html --- Date: Mon, 16 Feb 2004 13:44:45 -0800 (PST) From: Grace Conlon <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [R] Matrix mulitplication ABCD are four matrix. A * Inverse((Transpose(A)*Tranpose(B)*B*A+C)) * Transpose(A) * Transpose(B) * D how to write in R in an efficient way? ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
