I am working on an EFA (Exploratory Factor Analysis) using the psych package. I would like to extract the scores from the result of this EFA at the observation level, so I can use them as an independent variable in a subsequent GLM (Generalized Linear Model). The idea is to model the relationship between the factor identified in the EFA and other predictors in my dataset. I can get the factor scores, but I need them to be in a vector with the same number of observations as in my dataset, not a single value repeated across the entire dataset. How can I do this?
I can get the loadings:
fa_02$loadings
Loadings:
MR1 MR2
proxy_cientifico 0.659 0.156
records 0.361 0.704
propCR 0.473
propDD 0.464
propVU 0.154 0.647
propEN -0.215 0.815
label_pt 0.331 -0.104
label_fr 0.560 0.165
label_de 0.822 -0.109
label_es 0.803 0.105
label_it 0.836
label_en 0.917
n_languages 0.945
MR1 MR2
SS loadings 4.816 2.106
Proportion Var 0.370 0.162
Cumulative Var 0.370 0.532
and I can get the factor scores:
fa_02$r.scores
[,1] [,2]
[1,] 1.0000000 0.3630829
[2,] 0.3630829 1.0000000
fa_02$score.cor
[,1] [,2]
[1,] 1.0000000 0.3403204
[2,] 0.3403204 1.0000000
But I really need the scores factor at observation levels, to use as a variable in a GLM. It’s like when we take the principal component calculated in a PCA. But in my case, the analysis I need to use is EFA to identify the underlying structure of my set of observed variables. It’s similar to when we try to identify a latent variable.