Rmatsolve: Rmatsolve

Description Usage Arguments Details Value Author(s) Examples

Description

This function calculates matrix inverses for symmetric matrices.

Usage

1

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

1
2
3
4
5
6
7
8
9
#
#create a 4x4 matrix
m<-matrix(runif(16),4,4)

temp<-crossprod(m)

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

inv<-Rmatsolve(temp)

nunesmatt/adlift documentation built on May 15, 2019, 3:33 p.m.