ginv | R Documentation |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.