G inverse
Calculates the g-inverse of a squared matrix using the eigen decomposition and removing the eigenvalues smaller than a tolerance.
Ginv(X, tol = sqrt(.Machine$double.eps))
X |
Matrix to calculate the g-inverse. |
tol |
Tolerance. |
The function is useful to avoid singularities.
Returns the g-inverse.
Jose Luis Vicente-Villardon
data(iris) x=as.matrix(iris[,1:4]) S= t(x) Ginv(S)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.