| pinv | R Documentation | 
Calculation of the Moore-Penrose (MP) pseudo-inverse of a matrix X.
pinv(X, tol = sqrt(.Machine$double.eps))
| X | X-data ( | 
| tol | A relative tolerance to detect zero singular values. | 
| Xplus | The MP pseudo-inverse. | 
| sv | singular values. | 
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.