I want to understand how the main () function in the psych package calculates the $ score element.
I want to try the covariance matrix, not the correlation matrix.
model <- principal(mtcars[8:11],nfactors=4, rotate='none', scores=T, cov=T)
Basically, the PCA score should be a linear combination of the original centered data using the load matrix as weights, so I tried:
test <- scale(mtcars[8:11], center=T, scale=F) %*% model$loadings / model$scores
I understand that the function principal()uses some kind of scaling at load, however, the ratio should be the same for each column, which is not for test.
If I use the correlation matrix, this will not be a problem. For instance:
model <- principal(mtcars[8:11],nfactors=4, rotate='none', scores=T, cov=F)
test <- scale(mtcars[8:11], center=T, scale=T) %*% model$loadings / model$scores
The reference document uses the terminology of factor analysis, which confused me more. Hope someone can enlighten me here.
Thank you in advance!