I have a couple of questions regarding differences in loading values when using prcomp
and principal
(from the psych
) package to perform PCA
When conducting PCA using prcomp
:
pca_results <- prcomp(df, center = TRUE, scale. = TRUE)
pca_results$rotation[,1:5]
I get the following loadings:
PC1 PC2 PC3 PC4 PC5
q3 -0.016809164 0.134292686 -0.1757822345 1.108893e-01 -0.1319508350
q5 0.050866015 -0.161877460 0.0892043331 2.767157e-02 0.1474154691
q8 -0.008870246 -0.015767530 0.0115132365 1.618538e-01 0.2722705733
When using principal
from the psych
package:
pca_fit <- principal(df, nfactors = 5, rotate = "none")
pca_fit$loadings
I get these loading values instead:
PC1 PC2 PC3 PC4 PC5
q3 -0.335 -0.369 0.207 0.211
q5 -0.149 0.403 0.187 -0.235
q8 0.301 -0.435
My first question: why is there a difference in the loading values between the 2 methods? Which is correct? I've also tried prcomp
with center
and scale
set to FALSE
but the numbers still don't match
My second question: what does the missingness in the principal
loadings indicate? Is it some threshold of loading value, below which nothing is shown?