This is my first post on this forum. I am new to R and factor analysis and I think I have a very simple question. I'm following Andy Field's "Discovering Statistics Using R" book (2012) for general guidance. Field recommends providing both the pattern and structure matrices when performing factor analysis using oblique rotation.
While the pattern matrix is simply the table of loadings, I am having more difficulty obtaining the structure matrix in R using the factanal()
function.
To obtain the structure matrix for a PCA using the principal()
function, Field provides the following formula: fit$loadings %*% fit$Phi
, which multiplies the factor loading matrix by the factor correlation matrix. Although factanal()
does store the factor correlations somewhere—as it provides them in a section of the general output (under loadings)—I cannot find an object called "Phi", "Factor Correlations", or an equivalent, within the output of the fit model (within R Studio). Thus, I don't know what term to put in Field's formula to replace Phi in order to get the structure matrix.
I have seen here and here that earlier, factanal()
did not provide the factor correlations—yet now it does provide it in the output; I just don't know the right terminology to access it. Thanks for any help on this!
Edit: As per the book, I use the following formula with four factors and oblique rotation for PCA:
pc4 <- principal(raqData, nfactors = 4, rotate = "oblimin").
In that case when I double click on object "pc4" in R Studio there is an object called "Phi" and I have no trouble obtaining the structure matrix with pc4$loadings %*% pc4$Phi
.
Next, I attempt to use EFA, instead of PCA, again with four factors and oblique rotation (promax). This step works and I can get the factor correlations with (cut some output for conciseness):
> fit <- factanal(mydata, 4, rotation="promax")
> fit
Call...
Uniquenesses...
Loadings...
SS loadings...
Factor Correlations:
Factor1 Factor2 Factor3 Factor4
Factor1 1.000 -0.874 0.632 0.571
Factor2 -0.874 1.000 -0.118 -0.438
Factor3 0.632 -0.118 1.000 0.356
Factor4 0.571 -0.438 0.356 1.000
Test of the hypothesis that 4 factors are sufficient...
Next, I attempt the structure matrix formula and get the following error:
> fit$loadings %*% fit$Phi
Error in fit$loadings %*% fit$Phi :
requires numeric/complex matrix/vector arguments
But when I inspect the "fit" object obtained with factanal()
, there is no object called 'Phi" (as there were for principal()
). Not sure how to interpret the error above either. I have seen this error discussed here and here but I'm not clear about how to resolve it here.