%**% | R Documentation |
This operator computes an arbitrary power of a positive definite square matrix
using an Eigen-decomposition: \mathbf{X}^p = \mathbf{UD}^{p}\mathbf{U}'
X %**% power
X |
Positive definite square matrix |
power |
numeric scalar - desired power of X |
Matrix X
to the power p
# Inverse Square Root of a positive definite square matrix
X <- matrix(rnorm(100*500),100,500)
XX <- ccross(X)
XX_InvSqrt <- XX %**% -0.5
# check result: ((XX')^-0.5 (XX')^-0.5)^-1 = XX'
table(round(csolve(XX_InvSqrt %c% XX_InvSqrt),digits=2) == round(XX,digits=2) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.