LIMO-EEG-Toolbox / limo_tools

Hierarchical Linear Modelling for MEEG data
https://limo-eeg-toolbox.github.io/limo_meeg/
Other
59 stars 27 forks source link

LIMO/EEGlab: Trouble with Within Subjects Study #105

Closed rrooyyccee closed 2 years ago

rrooyyccee commented 2 years ago

Hello:

I'm having some trouble with LIMO. I was able to resolve most issues with running LIMO itself and was able to run through the Open Neuro dataset with your assistance previously.

I'm having difficulty with getting our analysis to work. I've done some troubleshooting with EEGlab.

To figure this out I've resorted to creating test studies with just a few subjects. The actual experiment is a drug study with three different drug sessions (placebo, low dose, high dose) each done by each subject 1 week apart. I created a sample study of just two of these subjects. While there are two conditions in each drug session (angry faces/ neutral faces) for now I am trying to keep things simple and am just looking at the neutral face epochs.

The study design has 3 "conditions", here defined as a drug. I am able to run a repeated measures ANOVA in ERSP in EEGlab. Looking at the files created in EEGlab for this, I see a single time-frequency file for each subject. Each subject is in their own folder. When I attempt to Estimate Model Parameters I get this error message:

"Cannot calculate contrast because more than 1 dataset per session. Merge datasets for each subject and try again. This is not a bug (Error occured in function std_limo() at line 316). :

Am I setting up the study incorrectly? This is so far the only way I can get it to work. I am wondering if I need to concatenate the three drug sessions into a single file., so that I might have neutral-placebo, neutral-low dose, neutral-high dose. I didn't want to do that because they are three separate sessions, and I though if I ever wanted to do work with components this would not make much sense.

So I have some uncertainty here:

  1. Perhaps I am setting up the study incorrectly in EEGlab?
  2. Maybe there is a bug in EEGlab? I've attempted to resolve this but things are still not quite working: https://github.com/sccn/eeglab/issues/442
  3. Or is what I am trying to do somehow not compatible with LIMO's approach?

Thank you, Royce Lee

Here is a link to the sample dataset. https://uchicago.box.com/s/kb472fcmdkei2y5e1mskcax9v40p098a This error comes up with different computers I am using: today I tested on Windows 10, Matlab 2022a, EEGlab 2021.1

CPernet commented 2 years ago

I replied on the EEGLAB discussion list as well as this is of greater interest to all -- also Github issues are more for code than how to analyse something.

From an analysis perspective, it is better IMO to leave sessions separated. In LIMO EEG, sessions are analysed separately allowing to have their own mean activity and variance. While in some designs it won't make a difference, in a case like yours this is likely relevant as you may have overall differences between sessions reflecting the drug effect. Concretely this means that in STUDY, you have to input 3 set files per subject, indicating the session. Then you create a design with your 2 conditions leading to estimate the face effect for each session. Finally at the group level you can run a repeated measure 3*2 ANOVA using beta parameters from all sessions.