[Eeglablist] Help with LIMO ANCOVA/Regression and STUDY cluster analysis

deniz doruk drdenizdoruk at gmail.com
Sun Jan 31 11:29:44 PST 2021

Hello All,

I have a couple of questions regarding data analysis using STUDY and LIMO, and hope to find some answers regarding to which methodology to choose and how to complete some steps in LIMO.I am using EEGlab2021, Matlab 2020a, MacOS-BigSur.

I apologize for the long email, and appreciate your help in advance.

I have   a STUDY design with 2 independent groups, and each subject has a single EEG file that consists of 2 conditions recorded during the same session. So I have 2 factors for the variable group (between subject)  and 2 factors for the variable condition (within subject).
So far with my Study design and using LIMO, I am able to run a repeated measure ANOVA with condition as the repeated variable and group as the between subject factor, and groupxcondition as the interaction term. I used OLS for the 1st level analysis as I did not have enough trials in some subjects compared to my sampling rate (1000Hz, downsampling to 250 would not help either).

For next steps I would like to do the following analysis but this is where I am encountering some issues. I am also open to any other suggestion too. 

My goal is to test the correlation between ERP components and the behavioral outcome of my task

I would like to explore the relationship between the main effects and a potential covariate. In order to do this, I thought I could just run an ANCOVA model by adding my continuous covariate (between subject variable such as age/behavioral outcome one per subject) as a variable but I am stuck at this step as I am not getting a lot of error messages. I am not even sure if this is a bug as I was not really sure in what order to enter files/parameters/covariate variable  while running ANCOVA in LIMO. I was not also sure if ANCOVA would work in my case (1 repeated measure with 2 levels, and 1 between subject factor with 2 levels). I read the WIKI tutorial and searched previously asked questions, but I could not find the answer, I am sorry if this has already been answered. 

What I tried was (after precomputing channel measures for ERPs, power spectrum and ERP-image):
1)First level analysis: Estimate model parameters (beta files), with interaction term, OLS, and selected timeframe. 
2)Second level analysis:
Choose channel file, and work folder
Run ANCOVA—> Full scalp analysis —> How many independent group?—>enter 2—>Load beta or con files? —> load beta files for each group separately (gp1 and gp2)_—> Which parameters to test?—> Enter [1 2] for my repeated conditions (n=2) —> Here I see the error:

"Index exceeds the number of array elements (23).

Error in limo_random_select>getdata (line 1851)
                begins_at = max(first_frame) -
                first_frame(subject_nb) + 1;

Error in limo_random_select (line 784)
    [data,removed] =

Error in limo_random_effect>ANOVA_Callback (line 265)

Error in gui_mainfcn (line 95)

Error in limo_random_effect (line 29)
    gui_mainfcn(gui_State, varargin{:});

Error in
Error while evaluating UIControl Callback."

I can submit this as a bug too, but again I first wanted to check I am following the correct steps and that my data is suitable for LIMO ANCOVA.

I also thought that if ANCOVA did not work, I could run a regression model separately for each independent group. 
In the tutorial it gives an example of creating a first level contrast for each subject, and then run a-sample t-test to create the con files which would be used in the regression model along with the regressor variable. 

I was wondering if there is a way to use parameters from the repeated measure ANOVA model as they would account for the noise better, or maybe it would not differ much since I used OLS? 

3) Component clustering 
My last question is more for seeking advice on identifying ICA clusters.For all of the analyses mentioned above I used channel data, but I am also hoping to analyze data using component clusters to see if I can differentiate ERP components and their associated dipoles corresponding to the channel ERPs that are significant in the above data.  I was able to cluster the components and got scalp maps and dipoles (based on rv 15%) however based on what Arnaud mentioned in my bug report(which was not a bug but more of my lack of knowledge), I needed to have different sessions for each condition, as otherwise I would not be able to compare cluster ERPs between conditions. With my mixed design (one repeated measure and one between subject factor), what would be the right way to approach the data ? 

Should I split each subject's data into 2 different sessions, one for each condition, (the conditions were recorded during the same session) and then create a study? At which step  I should run the ICA decomposition, before splitting the datasets or after? I had read in the tutorial that it is better to run the ICA for the whole dataset before splitting it into different conditions, but I was wondering if this would still be the recommended approach if I want to compare conditions and with my mixed design? 

Again I am open to any other suggestion here!

Thank you very much for help and advice,

Deniz Doruk Camsari, MD

More information about the eeglablist mailing list