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

Issue with study stats #850

Open
arnodelorme opened this issue Feb 11, 2025 · 8 comments
Open

Issue with study stats #850

arnodelorme opened this issue Feb 11, 2025 · 8 comments

Comments

@arnodelorme
Copy link
Collaborator

I'm exploring STUDY statistics for the first time in a 2x2 factorial design. I have sequentially compared "Compute 1st independent variable..." and "Compute 2nd independent variable...", using EEGLAB's permutation/Bonferroni option (n=1000, threshold = .05) and using Fieldtrip statistics (montecarlo, cluster correction, n=1000, threshold = .05).
The results are almost impossible to reconcile, unless what the EEGLAB statistics consider the 1st independent variable is the 2nd one for the Fieldtrip statistics option and vice versa.

@arnodelorme
Copy link
Collaborator Author

I am confused, because the fieldtrip option cannot compute 2x2 designs, only 1xm designs.

@KrisBaetens
Copy link

KrisBaetens commented Feb 12, 2025

I understand, because I might not have expressed myself very clearly :). So, I have a 2x2 design, manipulating Go/NoGo, and alcohol versus non-alcohol related context. In all the below examples, I show scalp maps in the 300-500 ms. As one can readily observe, there is a robust Go/NoGo effect, and maybe, maybe not, a subtle influence of alcohol context. So, running:

EEGLAB stats 1st factor (only), bonferroni, threshold .01, n = 1000, you get:
Image
So, no effect here. Alright, so I take the title of the right plot to mean "(Collapsed across) Go/NoGo", there not being much of an effect of alcohol context. That would be a counter-intuitive labeling of the figure imho (it would be more straightforward if GoNoGo displays the effect of the factor Go/NoGo), but it is not impossible.

Fieldtrip stats 1st factor (only) Fieldtrip (monte carlo, .01, n = 1000, cluster correction), one gets:
Image
At first I thought, okay, the cluster correction is probably more lenient, makes sense, here an effect of alcohol is detected. So, progressing with otherwise identical parameters, but moving on to the 2nd independent (only),

EEGLAB 2nd factor(only):
Image
So, as is immediately apparent, this looks very similar to the fieldtrip results for the first factor, previous plot.

Fieldtrip 2nd factor (only):
Image
There is an effect here, which is not present in the EEGLAB stats for the 1st independent. However, if we make the threshold in EEGLAB stats more lenient, we get something more similar to this for the 1st independent:
Image
From this, it would seem that:

  • the 1st independent using EEGLAB stats = alcohol vs no alcohol
  • the 1st independent using Fieldtrip stats = go vs no go
  • the inverse is true for the 2nd independent.

So, I conclude two things from this:

  • In a 2x2 design, if you calculate the effect of only 1 independent, the actual factor used is swapped between the EEGLAB and Fieldtrip statistics option - which seems undesirable, if true.
  • The labeling of the Fieldtrip stats corresponds more to intuition: GoNoGo shows you the effect of this factor, not the effect of the other factor "when you collapse across the one mentioned in the title". Such a way of naming things makes sense in the marginal effects plot:
    Image
    but can lead to critically erroneous conclusions when only considering the interaction plot:
    Image

For completeness, if ignoring the alcohol factor and making a 1x2 design, the same parameters give the figures below for EEGLAB and Fieldtrip stats, respectively. The effect labeled "GoNoGo" here seems identical to the one labeled "Alcohol" in the 2x2 analysis for EEGLAB stats:
EEGLAB:
Image
Fieldtrip:
Image

@arnodelorme
Copy link
Collaborator Author

arnodelorme commented Feb 12, 2025

I think the real way to compare is to use the same stats. This is for the first condition EEGLAB on the left and Fieldtrip on the right)

Image

This is for the second condition. EEGLAB on the left and Fieldtrip on the right)

Image

Bonferoni is much more aggressive than cluster correction, which could explain the difference in your case.

@arnodelorme
Copy link
Collaborator Author

I am closing this report, but let me know if you have more questions.

@KrisBaetens
Copy link

KrisBaetens commented Feb 12, 2025 via email

@arnodelorme
Copy link
Collaborator Author

Would you mind reposting with the images (they do not show up). Are you using the latest version of EEGLAB? There was a problem that was fixed a couple of months ago. Would you mind trying with the version below.

https://sccn.ucsd.edu/eeglab/currentversion/eeglab2025.0.0rc.zip

@KrisBaetens
Copy link

KrisBaetens commented Feb 13, 2025 via email

@arnodelorme
Copy link
Collaborator Author

Unfortunately, I cannot see the word doc on Github. Can you send it to my personal email at arnodelorme at gmail dot com. Also, is there a way to access the data to reproduce the issue?

@arnodelorme arnodelorme reopened this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants