jasp-stats / jasp-issues

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

[Bug]: Cannot perform sphericity test because there are only two levels of the RM factor, or because the SSP matrix is singular #2932

Closed lawriesm closed 1 week ago

lawriesm commented 1 month ago

JASP Version

0.18.0

Commit ID

No response

JASP Module

ANOVA

What analysis are you seeing the problem on?

Repeated Measures ANOVA

What OS are you seeing the problem on?

Windows 10

Bug Description

Running a simple 1-way repeated measures ANOVA with 1 RM factor with 3 levels, but I get the bug "Cannot perform sphericity test because there are only two levels of the RM factor, or because the SSP matrix is singular". Error is independent of names given image

Expected Behaviour

There should be a test for sphericity and adjusted values in the ANOVA table

Steps to Reproduce

  1. Load csv/jasp file
  2. Click to launch repeated measures dialogue box
  3. Move 3 variables to the Repeated Measures cells box
  4. Under "Assumptions" click "Sphericity Tests" ...

Log (if any)

JASP 2024-09-25 17_18_15 Desktop.log JASP 2024-09-25 17_36_39 Desktop.log

More Debug Information

No response

Final Checklist

JohnnyDoorn commented 1 month ago

Hi @lawriesm ,

Thanks for your report, are you able to share your data as a .csv or .jasp file? You can upload them here as a zipped file. That will help me figure out what is going wrong. ediT: I also see you are using a slightly older version of JASP - can you try if you still get the error in JASP 0.19.1?

Cheers, Johnny

lawriesm commented 1 month ago

Hi Johnny,

Absolutely. I've attached it as a zipped Jasp file as requested. If you need anything else just ket me know.

I'm going to try a newer version tomorrow, but our students are still on this version, so any help/guidance is greatly appreciated.

Thanks and best regards,

Lawrie

On Wed, 25 Sept 2024, 17:58 Johnny van Doorn, @.***> wrote:

Hi @lawriesm https://github.com/lawriesm ,

Thanks for your report, are you able to share your data as a .csv or .jasp file? You can upload them here as a zipped file. That will help me figure out what is going wrong.

Cheers, Johnny

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

JohnnyDoorn commented 1 month ago

Hi Lawrie,

I don't see the zipped file, maybe that's because you're replying by email? Github doesn't seem to handle that well.

Cheers, Johnny

lawriesm commented 1 month ago

Body Image Data Set Week 4 Workshop.zip Hi Jonny, Sorry about that. I've attached it here and hopefully this time you'll get it. All the best, Lawrie

JohnnyDoorn commented 1 month ago

Hi Lawrie,

Thanks, I had a look at your data, and I am getting the same error about a singular SSP matrix in R when conducting the RM ANOVA. This happens when there is a high degree of correlation between your repeated measures, and/or little variation. It does look like your rm measures are highly correlated, but not outlandishly so (approx 0.7 between before-halfway, and after-halfway). Is this an educational data set? If so, maybe you can introduce some additional noise to the measures and see if that improves the singularity error? You could also fit a mixed effects model instead of the rm anova if that fails.

Kind regards, Johnny

lawriesm commented 1 month ago

Hi Johnny, It is an old dataset that we've used each year, but we've only this year moved to JASP from SPSS so it's the first time we've had the error. I'll see if I can add some random noise to get it working tomorrow and get back to you, as I'm really not keen or returning to SPSS. All the best, Lawrie

JohnnyDoorn commented 1 month ago

Hi @lawriesm,

Ah I understand - for what it's worth, here is an updated csv with a bit of noise introduced to the before stroop column. Now the sphericity test works (while still having the same effects), but it does seem like there is a very high degree of sphericity. stroop_noisy.csv

Cheers Johnny

lawriesm commented 1 month ago

Hi Johnny, Thanks so much for that, it's very much appreciate it. We'll use the updated data and the high sphericity isn't necessarily a bad thing as we'll use it as a demonstration in the lesson. I'll be sure to check the correlation of our demo datasets in future and now I know a bit of noise can help there. Thanks again and all the best, Lawrie

github-actions[bot] commented 1 week ago

This issue will be automatically closed in 42 days due to inactivity. Feel free to leave a comment if you believe this is still relevant.