[R] prcomp: results with reversed sign in output?
René Mayer
mayer at psychologie.tu-dresden.de
Fri Sep 9 11:42:49 CEST 2011
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>:
> Hi,
>
> If all the signs are switched the PC's are still the same. The principal
> vectors are along the same axis, only in a different direction. So there
> is no problem :).
>
> hope this helps,
> Paul
>
> On 09/09/2011 09:01 AM, René Mayer wrote:
>> Dear All,
>>
>> when I'm running a PCA with
>>
>> prcomp(USArrests, scale = TRUE)
>>
>> I get the right principal components, but with the wrong sign infront
>>
>> Rotation:
>> PC1 PC2 PC3 PC4
>> Murder 0.5358995 -0.4181809 0.3412327 0.64922780
>> Assault 0.5831836 -0.1879856 0.2681484 -0.74340748
>> UrbanPop 0.2781909 0.8728062 0.3780158 0.13387773
>> Rape 0.5434321 0.1673186 -0.8177779 0.08902432
>>
>> instead of
>>
>> PC1 PC2 PC3 PC4
>> Murder -0.5358995 0.4181809 -0.3412327 0.64922780
>> Assault -0.5831836 0.1879856 -0.2681484 -0.74340748
>> UrbanPop -0.2781909 -0.8728062 -0.3780158 0.13387773
>> Rape -0.5434321 -0.1673186 0.8177779 0.08902432
>>
>> what is happening here?
>> any ideas?
>>
>> thanks,
>> René
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>
> --
> Paul Hiemstra, Ph.D.
> Global Climate Division
> Royal Netherlands Meteorological Institute (KNMI)
> Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
> P.O. Box 201 | 3730 AE | De Bilt
> tel: +31 30 2206 494
>
> http://intamap.geo.uu.nl/~paul
> http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
>
>
More information about the R-help
mailing list