Ginv {lazy.mat}R Documentation

Generalized Inverse

Description

Calculates Generalized Inverse of the input matrix X.

Usage

Ginv(X, tol = .Machine$double.eps, MASS = 0, MP = TRUE,
  nopermute = 0, eps = 1e-08, chkginv = 0, epsc = 1e-08)

Arguments

X

An input matrix
Must be a square matrix when matSwp is used.

tol

A relative tolerance to detect zero singular values.

MASS

= 1 to use MASS::ginv equivalent settings

MP

= 0 to use matSwp to calculate a g1-g2 inverse.

nopermute

= 1 not allow the permutation of rows/cols by matSwp.

eps

Tolerance for pivot in matSwp.

chkginv

= 1 to check if the result is valid.

epsc

tolerance for chkinv.

Details

When MP=1, the result is equivalent to ginv of MASS package.
Otherwize, a g1-g2 generalized inverse will be calculated by matSwp.

The input matrix X must not be a real matrix.

Examples

X <- demomat(4,4)
Ginv( X,chkginv=1 )
Ginv( X, MP=0, chkginv=1 )


[Package lazy.mat version 0.1.3 Index]