Consider the following simple example:
A <- array(c(1,1,0,0), dim=c(2,2))[2,] 0.0 0.0
A
[,1] [,2] [1,] 1 0 [2,] 1 0
ginv(A)
[,1] [,2] [1,] 0.5 0.5 [2,] 0.0 0.0
ginv(A)%*%A
[,1] [,2] [1,] 1 0 [2,] 0 0
A%*%ginv(A)
[,1] [,2] [1,] 0.5 0.5 [2,] 0.5 0.5
A%*%ginv(A)%*%A
[,1] [,2] [1,] 1 0 [2,] 1 0
ginv(A)%*%A%*%ginv(A)
[,1] [,2] [1,] 0.5 0.5 [2,] 0.0 0.0
hope this helps. spencer graves
alka seltzer wrote:
I'm rusty, but not *that* rusty here, I hope.have >inverse, which by
If W (=Z*Z' in your case) is singular, it can not
I >don't know if this isdefinition also mean that nothing multiply by it will produce the identity matrix (for otherwise it would have an inverse and thus nonsingular).
The definition of a generalized inverse is something
like: If A is a
non-null matrix, and G satisfy AGA = A, then G is
called a generalized
inverse of A. This is not unique, but a unique one
that satisfy some
additional properties is the Moore-Penrose inverse.
what ginv() in MASS returns, as I have not used it
before.
Andy
The inverse of a Matrix A is defined as a Matrix B such that B*A=A*B=I and not just B*A=I. But there are matrices B for singular matrices A such that B*A=I but A*B != I, therefore there exist "left-inverses" (or "right-inverses") for non-invertable matrices.
Best Regards
__________________________________
Yahoo! Finance: Get your refund fast by filing online.
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
