Ginv {lazy.mat} | R Documentation |
Calculates Generalized Inverse of the input matrix X.
Ginv(X, tol = .Machine$double.eps, MASS = 0, MP = TRUE, nopermute = 0, eps = 1e-08, chkginv = 0, epsc = 1e-08)
X |
An input matrix |
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. |
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.
X <- demomat(4,4) Ginv( X,chkginv=1 ) Ginv( X, MP=0, chkginv=1 )