ccross | R Documentation |
Computation of the following matrix-product: \mathbf{XDX}'
Where \mathbf{D}
is a diagonal matrix, which is being passed to the function as a vector.
ccross(X,D=NULL)
X |
matrix |
D |
numeric vector, will be used as a weighting diagonal matrix of dimension ncol(X). If omitted an identity matrix will be assigned. |
Square matrix of dimension nrow(X)
# Computing the matrix-square-root of a positive definite square matrix:
# generate random data
rand_data(100,500)
W <- ccross(M)
# this is the implementation of the matrix power-operator '%**%'
W_sqrt <- with(eigen(W), ccross(vectors,values**0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.