[R] pca analysis: extract rotated scores?

Mark Difford mark_difford at yahoo.co.uk
Wed Dec 1 09:20:31 CET 2010


Hi Liviu,

>> However, I'm still confused on how to compute the scores when rotations 
>> (such as 'varimax' or other methods in GPArotation) are applied.

PCA does an orthogonal rotation of the coordinate system (axes) and further
rotation is not usually done (in contrast to factor analysis). Neither
prcomp nor princomp do any further rotation and any rotate= argument in the
call is simply being passed through.

You can get what you want from by feeding the scores from prcomp/princomp
(or something else) to GPArotation. This returns rotated scores and the
rotating matrix.

##
library(GPArotation)
.PC <- princomp(~am+carb+cyl+disp+drat+gear+hp+mpg, cor=TRUE, data=mtcars)
.PCs <- .PC$scores
.PCrs <- entropy(.PCs)
.PCs
.PCrs

Regards, Mark.
-- 
View this message in context: http://r.789695.n4.nabble.com/pca-analysis-extract-rotated-scores-tp3065061p3066795.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list