Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Bayesian Paired-Samples t-test (Wilcoxon) - Won't run with ordinal data, but will with scale data. #2102

Closed
3 tasks done
JayD05 opened this issue Apr 18, 2023 · 3 comments · Fixed by jasp-stats/jaspTTests#258
Assignees
Labels
Bug: Critical Bugs that are breaking functionality, and must be fixed. Module: jaspTTests

Comments

@JayD05
Copy link

JayD05 commented Apr 18, 2023

JASP Version

0.16.4

Commit ID

No response

JASP Module

T-Tests

What analysis are you seeing the problem on?

Bayesian Paired-Samples t-test / Wilcoxon

What OS are you seeing the problem on?

Windows 10

Bug Description

In attempting to run a Bayesian t-test / Wilcoxon I noticed that the analysis would not run if data were ordinal, but would run if the same variables were relabelled as scale data. Further, Frequentist t-test/Wilcoxon will run with ordinal, but Bayesian equivalents will not (even though the same variables are used). See example below:

When data are coded as ordinal:

ordinal data

Frequentist Wilcoxon runs fine:

ordinal test

However, Bayesian returns the following error ("Number of observations < 2 in [Var1 & Var2]"), which doesn't make any sense as there are > 2 observations (as shown by the Frequentist analysis running fine):

ordinal bayes test

Note. The same issue exists for both paired-samples t-test and Wilcoxon.

Changing the same variables from ordinal to scale:

scale data

Rerunning the Bayesian analysis shows that it now works fine:

scale test

Data:

jasp data.zip

Expected Behaviour

The t-test / Wilcoxon should run regardless of whether data are ordinal or scale.

Steps to Reproduce

  1. Run analysis with ordinal variables
  2. Change data type on variables from ordinal to scale
  3. Rerun same analysis with scale variables
  4. JASP will run when data are scale but not ordinal
    ...

Log (if any)

No response

Final Checklist

  • I have included a screenshot showcasing the issue, if possible.
  • I have included a JASP file (zipped) or data file that causes the crash/bug, if applicable.
  • I have accurately described the bug, and steps to reproduce it.
@JayD05 JayD05 added the Bug label Apr 18, 2023
@tomtomme tomtomme added OS: Linux / Flatpak Bug: High Bugs that are negatively affecting the area of the program, but don't need immediate fix. and removed Bug labels Feb 7, 2024
@tomtomme
Copy link
Member

tomtomme commented Feb 7, 2024

@JayD05 @vandenman
tested with jasp 0.18.3 and your data. I had to switch to scale and then ordinal again - then everything worked. But on that switch the labels were lost. I re-entered labels and the bug was there again.

So this bug is isolated to ordinal data with labels
here the file that shows this directly
ddaf.jasp.zip

Since this may be solved by Joris work for 0.19 I will mark it for 0.19 to remember that I need to test this one after release.

@tomtomme tomtomme added Bug: Medium Bugs that don't influence the basic function of the app, but it's better to fix them at some point. and removed OS: Linux / Flatpak OS: Windows 10 Bug: High Bugs that are negatively affecting the area of the program, but don't need immediate fix. labels Feb 16, 2024
@tomtomme
Copy link
Member

tomtomme commented May 24, 2024

@JohnnyDoorn
@vandenman
the original bug is now solved, but if the Var is ordinal, bayesian paired t-Test now does not show any diagrams!
Hence I up this to critical for 0.19.

grafik

the error message is wrong. Switching to scale instead of ordinal produces graphs

@tomtomme tomtomme added Bug: Critical Bugs that are breaking functionality, and must be fixed. and removed Bug: Medium Bugs that don't influence the basic function of the app, but it's better to fix them at some point. labels May 24, 2024
@JohnnyDoorn
Copy link

JohnnyDoorn commented May 27, 2024

Somehow the Bayesian t-test (any) looks at the labels instead of the values.. when I use facFive from the debug data set it's fine, but when i adjust the labels to a-e instead of 1-5, it breaks. Descriptives, freq t-test and other analyses still work fine though. @vandenman do you have an idea how to solve this in a clean way? I see that the Bayesian t-tests have their own data reading function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Critical Bugs that are breaking functionality, and must be fixed. Module: jaspTTests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants