[R] prcomp: results with reversed sign in output?
vokey at uleth.ca
Sat Sep 10 20:00:24 CEST 2011
In addition, many PCA packages follow the convention that if the majority of weights are negative for that component, reverse the sign.
On 2011-09-10, at 4:00 AM, r-help-request at r-project.org wrote:
> The point is that a principal component vector is a solution,
> say V, of a matrix equation A%*%V = L*V where A is the matrix
> and L is a scalar..
> Since this equation can be written A%*%(-V) = L*(-V), the
> result is indeterminate with respect to its sign. If V is a
> solution, so is (-V), and vice versa. It is not a case of
> "direction reversal", since neither L nor (-L) has a primary
> role -- they are equivalent, and you can adopt either one.
> Just make it clear which one you adopt -- or someone else
> might think that they disagree!
> You originally wrote "I get the right principal components,
> but with the wrong sign in front." You did not get "the wrong
> sign" -- both are correct! It may be that you are comparing
> your result from R with the result from some other software
> (or from a textbook, or whatever) which produced the equivalent
> result but with the opposite sign. Again, both are correct.
> If, for some reason, you do not like the sign of the result
> you get, then change its sign.
> Hoping this helps,
> On 09-Sep-11 09:42:49, Ren? Mayer wrote:
>> thanks for pointing out Paul,
>> but the thing which is annoying me in the first place IS this
>> direction reversal.
>> this makes no sense for me
>> why could this be?
>> Zitat von "Paul Hiemstra" <paul.hiemstra at knmi.nl>:
Please avoid sending me Word or PowerPoint attachments.
-Dr. John R. Vokey
More information about the R-help