ginv: G inverse

View source: R/ginv.R

ginvR Documentation

G inverse

Description

Calculates the g-inverse of a squared matrix using the eigen decomposition and removing the eigenvalues smaller than a tolerance.

Usage

ginv(X, tol = sqrt(.Machine$double.eps))

Arguments

X

Matrix to calculate the g-inverse

tol

Tolerance.

Details

The function is useful to avoid singularities.

Value

Returns the g-inverse

Author(s)

Jose Luis Vicente Villardon

Examples

data(iris)
x=as.matrix(iris[,1:4])
S= t(x) 
ginv(S)


MultBiplotR documentation built on Nov. 21, 2023, 5:08 p.m.