Trying to replicate EFA in R

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
hjin
Posts: 5
Joined: Wed Jun 23, 2021 2:06 am

Trying to replicate EFA in R

Post by hjin »

I'm basically trying to get at what's under the hood of the jamovi EFA command by seeing if I can replicate it with the psych R package, which I read was what's being run with the jamovi EFA wrapper.

Basically, I managed to write the following:

Code: Select all

efa = fa(data,
         fm = "minres",
         nfactors = fa.parallel(data, fm = "minres")$nfact,
         rotate = "oblimin")
efasort = fa.sort(efa)$loadings
print(efasort, cutoff = 0.3)
Which spits out a similar output as jamovi's EFA with Extraction = "Minimum residuals", Rotation = "Oblimin", Number of Factors = "Based on parallel analysis", and Sort loadings by size = TRUE settings.

However, what's being given in R with the psych package is ever so slightly different from what jamovi (both the app and jmvcore on R) is giving me. Usually, the two results' item loadings would be off by around 0.005 to 0.030.

Is there an option that I'm missing in the psych fa function that's causing the differences?
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Trying to replicate EFA in R

Post by jonathon »

take a look in this file:

https://github.com/jamovi/jmv/blob/master/R/pca.b.R

and search for psych::fa , there's 3 references to it

that may give you some clues as to what jamovi is doing differently.

cheers
Post Reply