g2inv: Generalized type 2 inverse matrix, g2 inverse
Description
A generalized inverse is usually not unique. Some programs use this algorithm to get a unique generalized inverse matrix. This uses the SWEEP operator and works for non-square matrices also.
Usage
g2inv(A, eps=1e-08)
Value
g2 inverse
Arguments
A
a matrix to be inverted
eps
A value less than this is considered zero.
Author
Kyun-Seop Bae k@acr.kr
Details
See 'SAS Technical Report R106, The Sweep Operator: Its Importance in Statistical Computing' by J. H. Goodnight for details.
References
Searle SR, Khuri AI. Matrix Algebra Useful for Statistics. 2e. John Wiley and Sons Inc. 2017.