jasp-stats / jasp-issues

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

[Bug]: Factor analysis based on Polychoric/tetrachoric correlations #2206

Closed Mary-Toothfairy closed 1 year ago

Mary-Toothfairy commented 1 year ago

JASP Version

0.17.2.1

Commit ID

No response

JASP Module

Factor

What analysis are you seeing the problem on?

PCA and EFA

What OS are you seeing the problem on?

macOS Intel

Bug Description

I can run Factor on my data as long as I base my analysis on Correlation or Covariance matrix. When I want to switch to Polychoric, the analysis is terminated. I get this message:

This analysis terminated unexpectedly.

Error in if (isTryError(efaResult) && options[['basedOn']] = 'mixed' && : missing value where TRUE/FALSE needed

Stack trace

To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports

Expected Behaviour

I should have just gotten a factor matrix.

Steps to Reproduce

  1. Click on Factor
  2. Click Polychoric matrix
  3. Analysis is terminated. ...

Log (if any)

This analysis terminated unexpectedly.

Error in if (isTryError(efaResult) && options[['basedOn']] = 'mixed' && : missing value where TRUE/FALSE needed

Stack trace

To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports

Screenshot 2023-07-01 at 17 05 07

JASP_bug_file.csv

Final Checklist

tomtomme commented 1 year ago

I recently ran into this error too and just want to confirm it (JASP 0.17.2.1 flatpak)

juliuspfadt commented 1 year ago

hi @Mary-Toothfairy, thanks for creating the issue. Could you provide me either with the zipped .jasp file or with a screenshot showing which variables you used in the analysis?

Mary-Toothfairy commented 1 year ago

Hello, I attached a screen shot to this message. This is the regular Factor analysis, yet I have ordinal data so I would prefer to use the Polychoric correlations table. Thank you, Mary Toothfairy

On Mon, 3 Jul 2023 at 04:35, Julius Pfadt @.***> wrote:

hi @Mary-Toothfairy https://github.com/Mary-Toothfairy, thanks for creating the issue. Could you provide me either with the zipped .jasp file or with a screenshot showing which variables you used in the analysis?

— Reply to this email directly, view it on GitHub https://github.com/jasp-stats/jasp-issues/issues/2206#issuecomment-1617725613, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAWDGKZXKS5SDLTZKYSVH43XOKG7BANCNFSM6AAAAAAZ3BGDF4 . You are receiving this because you were mentioned.Message ID: @.***>

juliuspfadt commented 1 year ago

Hmm, it seems you replied through email, and then attachments get lost. You would need ti manually upload it to the website here.

Mary-Toothfairy commented 1 year ago
Screenshot 2023-07-03 at 10 32 24
juliuspfadt commented 1 year ago

Hi @Mary-Toothfairy, thanks for sharing the data and the screenshot. I can reproduce the issue, which is due to the psych package failing with the polychoric correlation when not all items cover the whole range of response categories. This is quite unfortunate, and all I can do at this point is change the module to produce a more accurate error message when this happens. In order to get the proper correlations the responsibility lies with the psych package.