Out of curiosity and possibly for later use: is there an R-function that
does matrix logarithms?
Best, Ingmar
On 9/21/06 8:58 PM, Dimitrios Rizopoulos
[EMAIL PROTECTED] wrote:
Quoting Douglas Bates [EMAIL PROTECTED]:
On 9/21/06, Dimitrios Rizopoulos [EMAIL PROTECTED] wrote:
Quoting Duncan
I am getting a bit rusty on some of these things, but I seem to recall
that there is a numerical advantage (speed and/or accuracy?) to
diagonalizing:
expM - function(X,e) { v - La.svd(X); v$u %*% diag(v$d^e) %*% v$vt }
P - matrix(c(.3,.7, .7, .3), ncol=2)
P %*% P %*% P
[,1] [,2]
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P
Returns the element by element product, whereas
P%*%P
Returns the matrix product.
Now, P^2 also returns the element by element product. But, is there a
slick way to write
P %*% P %*% P
Obviously,
On 9/21/2006 10:40 AM, Doran, Harold wrote:
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P
Returns the element by element product, whereas
P%*%P
Returns the matrix product.
Now, P^2 also returns the element by element product. But,
Quoting Duncan Murdoch [EMAIL PROTECTED]:
On 9/21/2006 10:40 AM, Doran, Harold wrote:
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P
Returns the element by element product, whereas
P%*%P
Returns the matrix product.
Now, P^2 also returns
:26 PM
Subject: Re: [R] Exponentiate a matrix
Quoting Duncan Murdoch [EMAIL PROTECTED]:
On 9/21/2006 10:40 AM, Doran, Harold wrote:
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P
Returns the element by element product, whereas
P%*%P
Returns
On 9/21/06, Dimitrios Rizopoulos [EMAIL PROTECTED] wrote:
Quoting Duncan Murdoch [EMAIL PROTECTED]:
On 9/21/2006 10:40 AM, Doran, Harold wrote:
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P
Returns the element by element product,
Quoting Douglas Bates [EMAIL PROTECTED]:
On 9/21/06, Dimitrios Rizopoulos [EMAIL PROTECTED] wrote:
Quoting Duncan Murdoch [EMAIL PROTECTED]:
On 9/21/2006 10:40 AM, Doran, Harold wrote:
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P