Rmatsolve {adlift}R Documentation

Rmatsolve

Description

This function calculates matrix inverses for symmetric matrices.

Usage

Rmatsolve(m)

Arguments

m

a (symmetric) matrix.

Details

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.

Value

inv

the matrix inverse of m.

Author(s)

Matt Nunes (nunesrpackages@gmail.com), Marina Knight

Examples

#
#create a 4x4 matrix
m<-matrix(runif(16),4,4)

temp<-crossprod(m)

#i.e. temp is t(m)%*%m

inv<-Rmatsolve(temp)


[Package adlift version 1.4-5 Index]