Building points from the main loads in R

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!

+4
1

psych. () . ( ). , ().

model <- principal(mtcars[8:11],nfactors=4, rotate='none', scores=T, cov=T)
L <- model$loadings            # Just get the loadings matrix
S <- model$scores              # This gives an incorrect answer in the current version

d <- mtcars[8:11]              # get your data
dc <- scale(d,scale=FALSE)     # center the data but do not standardize it
sc <- dc %*% L                 # scores are the centered data times the loadings
lowerCor(sc)                   #These scores, being principal components
                               # should be orthogonal 
    PC1 PC2 PC3 PC4
PC1 1              
PC2 0   1          
PC3 0   0   1      
PC4 0   0   0   1  

psych, , ( ).

, ( ).

factor.congruence(L,L)
    PC1 PC2 PC3 PC4
PC1   1   0   0   0
PC2   0   1   0   0
PC3   0   0   1   0
PC4   0   0   0   1 

( , , () , ). Loadings

round( t(L) %*% L,3)
      PC1   PC2   PC3   PC4
PC1 2.742 0.000 0.000 0.000
PC2 0.000 0.721 0.000 0.000
PC3 0.000 0.000 0.142 0.000
PC4 0.000 0.000 0.000 0.051
+1

All Articles