psych (version 1.0-17)

factor.congruence: Coefficient of factor congruence

Description

Given two sets of factor loadings, report their degree of congruence.

Usage

factor.congruence(x, y, loading=TRUE)

Arguments

x
A matrix of factor loadings
y
A second matrix of factor loadings
loading
Is the input a loading matrix from a factor analysis or principal components, or is it just a matrix

Value

  • A matrix of factor congruences.

Details

Find the coefficient of factor congruence between two sets of factor loadings.

It is an interesting exercise to compare factor congruences with the correlations of factor loadings. Factor congruences are based upon the raw cross products, while correlations are based upon centered cross products.

References

Gorsuch, Richard, (1983) Factor Analysis. Lawrence Erlebaum Associates. Revelle, W. In preparation) An Introduction to Psychometric Theory with applications in R (http://personality-project.org/r/book/)

See Also

principal, factor.pa

Examples

Run this code
#fa <- factanal(x,4,covmat=Harman74.cor$cov)
#pc <- principal(Harman74.cor$cov,4)
#pcv <- varimax(pc$loading)
#round(factor.congruence(fa,pcv),2)
#
#round(factor.congruence(pcv,fa),2)
#    Factor1 Factor2 Factor3 Factor4
#PC1    1.00    0.60    0.45    0.55
#PC2    0.44    0.49    1.00    0.56
#PC3    0.54    0.99    0.44    0.55
#PC4    0.47    0.52    0.48    0.99


#compare with 
#round(cor(fa$loading,pcv$loading),2)



## The function is currently defined as
#function (x,y,loading=TRUE) {
# if (loading) {x <- x$loadings
#      y <- y$loadings }
      
#  nx<- dim(x)[2]
#  ny<- dim(y)[2]
#  cross<- t(y) \%*\% x   #inner product will have dim of ny * nx
#   sumsx<- sqrt(1/diag(t(x) \%*\%x))   
 #  sumsy<- sqrt(1/diag(t(y) \%*\%y)) 

 #  result<- matrix(rep(0,nx*ny),ncol=nx)
#    result<-  sumsy * (cross * rep(sumsx, each = ny))
#  return(t(result))
#   }

Run the code above in your browser using DataCamp Workspace