ginv: G inverse

Description Usage Arguments Details Value Author(s) Examples

View source: R/ginv.R

Description

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

Usage

1
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

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

villardon/MultBiplotR documentation built on June 5, 2021, 8:55 a.m.