[R] Principle component analysis

Liviu Andronic landronimirc at gmail.com
Thu Mar 6 14:04:34 CET 2008


On 3/5/08, phthao05 <phthao05 at gmail.com> wrote:
>  1) I don't know why PCA rotation function not run although I try many times.
>  Would you please hepl me and explain how to read the PCA map (both of
>  rotated and unrotated) in a concrete example.

If you used the example from here [1], there's a typo in the document.
It should look like the following:

library(psych)
fit <- factor.pa(mydata, nfactors=3, rotate="varimax") # rotatE; not rotatION
fit # print results

Also, there are a _lot_ of rotation methods in GPArotation. Load the
package and use in the function above, say, rotate="quartimax". For
un-rotated PCA, I'd imagine it would be rotate="none".

Liviu

[1] http://www.statmethods.net/advstats/factor.html



More information about the R-help mailing list