Ginv {haplo.score}R Documentation

Compute Generalized Inverse of Input Matrix

Description

Singular value decomposition (svd) is used to compute a generalized inverse of input matrix.

Usage

Ginv(x)

Arguments

x A matrix.

Details

The function svd is used to compute the singular values of the input matrix, and the rank of the matrix is determined by the number of singular values that are at least as large as max(svd)*eps, where eps is a small value (currently eps = .000001).

Value

List with components:

Ginv Generalized inverse of x.
rank Rank of matrix x.

Side Effects

References

Press WH, Teukolsky SA, Vetterling WT, Flannery BP. Numerical recipes in C. The art of scientific computing. 2nd ed. Cambridge University Press, Cambridge.1992. page 61.

See Also

svd

Examples


save <- Ginv(x)
ginv.x <- save$Ginv
rank.x <- save$rank


[Package Contents]