Rmatsolve | R Documentation |
This function calculates matrix inverses for symmetric matrices.
Rmatsolve(m)
m |
a (symmetric) matrix. |
This function uses the eigenvalue decomposition of a matrix m to work out its inverse. The function is used here since standard matrix inverse algorithms do not cope well with matrices which are near singular (this often happens in the regression stages of the forward transforms.
inv |
the matrix inverse of m. |
Matt Nunes (nunesrpackages@gmail.com), Marina Knight
#
#create a 4x4 matrix
m<-matrix(runif(16),4,4)
temp<-crossprod(m)
#i.e. temp is t(m)%*%m
inv<-Rmatsolve(temp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.