I am trying to replicate the results of a factor analysis in Stata using the output matrices. Here is the Stata code I used:
factor var_1 var_2 … var_n, factors(2)
rotate
predict factor1 factor2
I also used the command:rotate2, nosort uniq matrix(mymat)
This allowed me to store the rotated loadings and uniqueness matrices.
My goal is to use these results to predict the values of factor1 and factor2 for new data — essentially, applying the factor analysis results from the original data to compute factor values for the new dataset.
Here’s what I’ve done so far:
Let U be the diagonal matrix of uniqueness.
Let L be the matrix of loadings.
Let D be the matrix with the new data.
Let F be the resulting matrix of factor scores.
Based on my research, I tried using the formula:
𝐹 = D(𝑈^−1)𝐿
However, when I apply this method to the original data, the results differ from the factor scores produced by Stata’s predict command.
My question is: What is the correct way to use the rotated loadings and uniqueness matrices to predict factor scores for new data in Stata?
Any guidance or corrections to my approach would be greatly appreciated!