pinv {rchemo} | R Documentation |
Moore-Penrose pseudo-inverse of a matrix
Description
Calculation of the Moore-Penrose (MP) pseudo-inverse of a matrix X
.
Usage
pinv(X, tol = sqrt(.Machine$double.eps))
Arguments
X |
X-data ( |
tol |
A relative tolerance to detect zero singular values. |
Value
Xplus |
The MP pseudo-inverse. |
sv |
singular values. |
Examples
n <- 7 ; p <- 4
X <- matrix(rnorm(n * p), ncol = p)
y <- rnorm(n)
pinv(X)
tcrossprod(pinv(X)$Xplus, t(y))
lm(y ~ X - 1)
[Package rchemo version 0.1-2 Index]