0
$\begingroup$

I have performed an exploratory factor analysis on a large data set as a dimension reduction technique. I have come up with 20 factors that group together my predictor variables. However, I am not sure how to extract those factors, put them into a data frame and use those factors as more predictors for regression or some other kind of analysis. Any kind of help on how to use those factors in a further analysis would be helpful and any reading on the matter would be appreciated.

I am using R and the fa() function in the psych package for my factor analysis.

Below is my code that may be helpful.

 cor <- cor(ads[,c(2:25,79,80)], use = "complete.obs")
 solution <- fa(r = cor, nfactors = 3, rotate = "oblimin", fm = "minres")
 print(solution$loadings, cutoff = 0.3)
$\endgroup$
2
  • $\begingroup$ question is very generic. Is there any piece of code that you can share and based on what scores are you narrowing down your factors data(mtcars); head(mtcars)uls <- fa(as.matrix(mtcars),4,rotate="varimax") ; $\endgroup$
    – Not_Dave
    Commented Jan 31, 2019 at 18:32
  • $\begingroup$ I put some of my code up. I am new to the process so I am not sure what you mean by the scores. I am just not sure how to extract the factors from the loadings for further analysis. $\endgroup$ Commented Jan 31, 2019 at 19:02

1 Answer 1

1
$\begingroup$

The psych package has a function (factor.scores()) that you can use to obtain factor scores based on your data and the loading matrix from fa. Note that you will need the raw data to compute factor scores for use in subsequent analyses. Providing the correlation matrix instead of the raw data will result in computation of the factor weights.

This is all well documented: see https://cran.r-project.org/web/packages/psych/psych.pdf for detailed information.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.