[Eeglablist] replicating EEGLAB stats on ERSP

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Fri Jul 8 14:28:39 PDT 2022


Dear Radha,

> I have a data that is 2 groups (C and T) x 2 conditions (L and R) x 2
time points (before, after).

2x2x2 maybe already too much, I would say.
I believe that after all what you need is just a paired or two-sample
t-test, so I always directly perform t-test as a 'planned test' without
bothering to perform ANOVA. I sometimes cite the following paper to justify
this approach.

Ruxton G, Beauchamp G. (2008). Time for some a priori thinking about post
hoc testing. Behavioral Ecology. 19:690-693.

> 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

If you are running 2x2x2 ANOVA, there is no two-sided test.

> 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.

My first guess is the baseline correction. Check how it is process in your
calculation and what EEGLAB does.

>  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)

Permutation test uses the Monte-Carlo method so it is not surprising that
you can't obtain the exact replication. However, 'naccu', 1000 seems too
small nowadays. Use at least 5000, if possible 10000 for the better
stability of the results. Even if you set it to 10000, the final result
would still fluctuate (but less so).

Makoto

On Mon, Jul 4, 2022 at 2:58 PM Radha Kumari (PGR) <
2375059K at student.gla.ac.uk> wrote:

> 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
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>



More information about the eeglablist mailing list