[R] How to solve A'A=S for A

Spencer Graves spencer.graves at pdf.com
Wed Feb 19 00:10:07 CET 2003


Of course.  Thanks helping me understand something that should have been 
obvious to me but wasn't.

Spencer Graves

Peter Dalgaard BSA wrote:
> Spencer Graves <spencer.graves at pdf.com> writes:
> 
> 
>>I think it's interesting that solve(chol(W)) is not the same as
>>chol(solve(W)), but I'll let someone else comment on that.
> 
> 
> That's basically because inv(R'R) = inv(R)inv(R') = inv(R)inv(R)'
> Notice that the last form is upper tri by lower tri, whereas the
> Choleski factorization is the other way around. Actually, this UU'
> factorization works just like the Choleski factorization taking the
> rows and columns of W in the reverse order so we have
> 
> 
>>solve(chol(W))
> 
>      [,1] [,2] [,3]
> [1,]    1  0.0 -2.0
> [2,]    0  0.5 -0.5
> [3,]    0  0.0  1.0
> 
> 
>>zapsmall(chol(solve(W)[3:1,3:1]))[3:1,3:1]
> 
>      [,1] [,2] [,3]
> [1,]    1  0.0    0
> [2,]    0  0.5    0
> [3,]   -2 -0.5    1
> 
> which are each others transposes.
>




More information about the R-help mailing list