[Eeglablist] replicating EEGLAB stats on ERSP

Radha Kumari (PGR) 2375059K at student.gla.ac.uk
Mon Jul 4 09:47:15 PDT 2022


Hello there,

I hope you are doing well. I have a data that is 2 groups (C and T) x 2 conditions (L and R) x 2 time points (before, after). For each condition and group I was interested in the difference between before and after time points in 4 frequency bands. I created 4 studies- LC, LT, RC, RT. For each study I precomputed ERSP as -

Note that I repeated this 4 times with 4 different topo freqs and  kept the topotime fixed at [400 1400]
std_precomp(STUDY, ALLEEG,'channels', 'interp', 'off', 'erp', 'off', 'spec', 'off','erp','off','ersp', 'on', 'erspparams', { 'cycles',[3 0.5] , 'baseline',[-4500 -3500], 'alpha',0.05, 'freqs', [2 35], 'plotitc' , 'off', 'plotphase', 'off', 'padratio', 1,'winsize',256,'naccu',1000 });

STUDY = pop_statparams(STUDY, 'condstats', 'on','mode','eeglab','method','perm','naccu' ,10000,'alpha' ,0.05,'mcorrect','fdr');
STUDY = pop_erspparams(STUDY, 'topofreq', frequency,'topotime',time,'ersplim',clims);
[STUDY ,erspdata, ersptimes, erspfreqs, pgroup, pcond, pinter] = std_erspplot(STUDY,ALLEEG,'channels',channels);

While I assume the tests are two-sided, all of my results in the 4 studies and 4 frequency  bands are uni directional i.e., after> before.

  1.  Is my assumption correct that the tests performed were two-sided as after looking at the data returned from erspdata, I think the changes were in both directions however what showed up in significance was only after>before
  2.  I calculated individual ERSPs myself and compared it with ERSP data, the values are different even though the trend is the same. My values are smaller at each channel. I don't know what to make of it. What I noticed though was that the erspfreqs returned by the EEGLAB study was [2         2.18121168366910         2.37884220448729         2.59437920501642         2.82944511692498         3.08580937366862         3.36540172971081         3.67032678654271         4.00287983484530         4.36556413204400         4.76110974531056......] while when I used the same parameters in pop_newtimef they were integers

[2      3       4       5       6       7       8       9         10     11     12     13......], however both were of the size 34. Is there a reason for these discrepancies?



  1.  I did permutation tests myself on the values from erspdata for each channel (64 channels in total). I can't replicate the results. An example being for the LC condition EEGLAB STUDY returns the following as significant (after FDR)

Theta- C5, Alpha - AF3, FC3, FC1, Lower beta- Fp1, Fp2, AF7, O1, Oz, Higher beta- PO7, Oz



Whereas from the test I do I get only Lower beta O1 and Higher beta-PO7, Oz, however these are not significant after FDR. Again, Is it because the EEGLAB study makes the distribution together for all channels or am I missing something here?




Thanks a lot for your time,
Radha




More information about the eeglablist mailing list