[R] Principal Component analysis question

Thomas Lumley tlumley at u.washington.edu
Thu Apr 11 01:41:41 CEST 2002


On Wed, 10 Apr 2002, Damien Joly wrote:

> Now when I call princomp [fun<-princomp(~V1+V2+V3+V4+V5)], I get the
> following loadings:
>
>         Comp.1      Comp.2     Comp.3      Comp.4     Comp.5
> V1 -0.4517989 -0.05072137  0.6904702  0.42041399 -0.3739091
> V2 -0.4616809  0.29956355  0.3405484 -0.54786307  0.5300805
> V3 -0.4505416  0.32457242 -0.4544927  0.60629605  0.3427923
> V4 -0.4707389  0.18468403 -0.4109350 -0.38827811 -0.6516665
> V5 -0.3976754 -0.87648935 -0.1784558 -0.06887199  0.1924341
>
> However, this is in contrast to the results in Manly's book:
>
>        Comp.1      Comp.2     Comp.3      Comp.4     Comp.5
> V1 0.4517989 -0.05072137  0.6904702 -0.42041399  0.3739091
> V2 0.4616809  0.29956355  0.3405484  0.54786307 -0.5300805
> V3 0.4505416  0.32457242 -0.4544927 -0.60629605 -0.3427923
> V4 0.4707389  0.18468403 -0.4109350  0.38827811  0.6516665
> V5 0.3976754 -0.87648935 -0.1784558  0.06887199 -0.1924341

<and two other ways snipped>

These four are all the same principal components, it's just that the sign
is reversed on some of them. That is, if vectors (v1,v2,v3,v4,v5) are
principal components, so are (-v1,-v2,-v3,-v4,-v5), or as in this case
(v1, v2,v3,-v4,-v5).

Principal components are only defined up to sign changes (they specify
lines in n-space and you can go along a line in either direction).
Different computations will likely give different signs

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list