jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
59 stars 29 forks source link

[Feature request]: Add option for kaiser normalisation for PCA and EFA #2710

Open TarandeepKang opened 6 months ago

TarandeepKang commented 6 months ago

JASP Version

0.18.3

Commit ID

No response

JASP Module

Factor

What analysis are you seeing the problem on?

PCA

What OS are you seeing the problem on?

Windows 11

Bug Description

This forum post: https://forum.cogsci.nl/discussion/9294/kaiser-normalization-for-oblimin-rotation#latest

Inspired me to dig around in PCA for a little while. I find that PCA results differ between SPSS and JASP. By the look of the documentation, we are using the psych for PCA. And I believe therein lies the difference. The documentation doesn't mention whether kaiser normalisation is applied in Jasp so I therefore assume not? And this may therefore explain why the results are different between it and SPSS? This would certainly fit with the reasoning behind the kaiser function in the psych package?

https://rdrr.io/cran/psych/man/kaiser.html

If it isn't already, might be a good idea to add this functionality as a checkbox at least, if not to make it the default?

Expected Behaviour

See above. Results should not differ with SPSS, unless Kaiser normalisation is not recommended?

Steps to Reproduce

I have just been using the Spearman data from the data library with varimax and oblimin rotation and some example data I found online. I then compare with SPSS bank2.zip (attached).

Log (if any)

No response

Final Checklist

juliuspfadt commented 6 months ago

@TarandeepKang, thanks for also looking into the forum. You are correct. I changed this into a feature request, so we would add the option for this.

TarandeepKang commented 6 months ago

No problem Julius! I'm glad this looks like both a relatively useful feature, and that it should be relatively easy for you to implement?

Relatedly: I think this would be very good resource for the help file for EFA:

Grieder, S., & Steiner, M. D. (2022). Algorithmic jingle jungle: A comparison of implementations of principal axis factoring and promax rotation in R and SPSS. Behavior Research Methods, 54(1), 54–74. https://doi.org/10.3758/s13428-021-01581-x

TarandeepKang commented 1 month ago

Hi @juliuspfadt, I was just wondering whether you had any update on this? Also, I recall there was some discussion in another issue about switching functionality for this analysis to lavaan? Arguably one reason not to do this would be that psych is very much considered the default by most people, and we don't have an equivalent route through the "algorithmic jingle jungle" yet? In any case, what do you think?

juliuspfadt commented 1 month ago

I have not had time to look into it further. I do not have an issue with switching to lavaan if it offers the functionality of psych and beyond. What do you mean by "algorithmic jingle jungle"?

TarandeepKang commented 1 month ago

Sorry @juliuspfadt , let me clarify. This paper compares implementations of PAF and promax in psych and SPSS Grieder, S., & Steiner, M. D. (2022). Algorithmic jingle jungle: A comparison of implementations of principal axis factoring and promax rotation in R and SPSS. Behavior Research Methods, 54(1), 54–74. https://doi.org/10.3758/s13428-021-01581-x

In the abstract the authors write:

we identified implementations of PAF and promax that maximize performance on average. We recommend researchers to use these implementations as best way through the jungle, discuss model averaging as a potential alternative, and highlight the importance of adhering to best practices of scale construction.

My takeaway from this is that there are very many subtle variations and differences in the implementations and roots through the "jungle" and we don't have any "map" that would guide us through comparing existing implementations with what's available in lavaan.

Relatedly there is also this:

Weide, A. C., & Beauducel, A. (2019). Varimax Rotation Based on Gradient Projection Is a Feasible Alternative to SPSS. Frontiers in Psychology, 10. https://doi.org/10.3389/fpsyg.2019.00645

Therefore, while Lavaan certainly has advantages, I question whether it also has the necessary flexibility to do everything that current best practice requires it to.