Skip to content
Prev 44359 / 398506 Next

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

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,