[R] Comparison of % variance explained by each PC before AND after rotation

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Feb 17 18:00:27 CET 2004


You are applying varimax to the rotation matrix, so each column has length 
one, both before and after rotation.  Unlike factor analysis, there is no 
information in the loadings matrix about the variances.

There is no such thing as `each PC after rotation': after rotation the 
vectors are no longer PCs.

See http://www.stats.ox.ac.uk/pub/MASS3/VR3stat.pdf for how to do this in
S-PLUS, and the various snags.  There is no comparable code implemented in
R.  You need to rotate the scores also, and compute their variances
directly.

Once again, factor analysis and PCA are quite distinct, and you need to be 
very careful not to confuse them.

On Tue, 17 Feb 2004, Maurice McHugh wrote:

> Hello again-
> 
> Thanks to Prof. Ripley for responding to my previous question.
> 
> I would like to clarify my question using sample code.   I will use some 
> sample code taken from ?prcomp
> 
> Again, I would like to compare the % variance explained by each PC 
> before and after rotation.
> 
> < code follows >
> 
> data(USArrests)
> pca = prcomp(USArrests, scale = TRUE)
> 
> # proportion variance explained by each PC
> prop = pca$sdev^2/sum(pca$sdev^2)
> 
> # cumulative proportion variance explained by each PC
> cumProp =  cumsum(prop)
> 
> # following print statements also can be obtained
> # from print(summary(pca))
> #print(prop)
> #print(cumProp)
> 
> print(summary(pca))
> 
> # Rotate the PCA loadings through PCs 1 and 2 using VARIMAX rotation
> 
> rot  = varimax(pca$rotation[,1:2], normalize = TRUE, eps = 1e-5)
> 
> < end code >
> 
> How can I calculate the new % variance explained by each PC after 
> rotation  ??????
> 
> Many thanks once more,
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list