[Eeglablist] How to access non-parametric statistics (cluster method Oostenveld and Maris)

Benedikt Ehinger behinger at uos.de
Tue Jun 25 23:54:22 PDT 2013


Hi EEGlablist,
I had the same problem and found no other solution than modifying the 
function statcondfieldtrip directly. As this is a low-level function you 
need to prepare your input a little. It is sometime ago that I did the 
simple modifications (but it was in v11.x), therefore I'm not sure a) if 
it still works b) if these were the only modifications.
what I think I did to get the fieldtripstat:
Simply add to line 224 (after or before eeglab saves the relevant 
stats.X values,e.g. pvals = stats.prob etc.):

fullStat = stat;

and put fullStat in the output to the function.

function [ori_vals, df, pvals,fullStat ] = statcondfieldtrip( data, 
varargin );

As I wanted paired testing  I used the following command:

[stats,df,pvals,ftStat] = 
statcondfieldtrip(dataCell,'paired','on','method','montecarlo','correctm','cluster','naccu',1000);
where dataCell{1} = (ElecxTimesxTrials), dataCell{2} = (ElecxTimesxTrials)


But if you only need the t/F-values or p-values you can use this 
function directly without modifications (they are saved in stats/pvals).


If you have trouble using the functions you are welcome to ask me anytime.

Best,
Benedikt


PS: I just noticed, that you need to put the fullStat = stat in other 
places as well, if you test more than one electrode at a time (two-way 
Anova) because there are "returns" in the code.


Am 26.06.2013 05:44, schrieb Makoto Miyakoshi:
> Dear Mikolaj and Felix,
>
> I haven't used the function, so I don't know. I believe the ERP plots 
> are generated on the fly and the results are not saved. If you want to 
> access the output, you have to identify which function generates the 
> plots.
>
> Makoto
>
> 2013/6/23 Miko?aj Magnuski <imponderabilion at gmail.com 
> <mailto:imponderabilion at gmail.com>>
>
>     Dear Felix,
>
>     I had a similar problem previously and could not find the cluster
>     statistics data anywhere in EEGlab structures (perhaps I was
>     not looking carefully enough - Makoto, is FieldTrip output saved
>     anywhere in the workspace when doing cluster statistics from
>     EEGlab?).
>
>     When doing cluster statistics EEGlab uses another toolbox -
>     FieldTrip. If you are unable to dig up the output of this procedure
>     anywhere in EEGlab I suggest you should perform it in FieldTrip
>     directly. It's a little bit harder than EEGlab because you don't have
>     a GUI in FieldTrip, but all the functions are described very well and
>     some really helpful tutorials are present on the FieldTrip web page
>     (the page is here: http://fieldtrip.fcdonders.nl/).
>     There is a function called eeglab2fieldtrip that can transform your
>     EEG structure from EEGlab to FieldTrip style. All the following
>     steps can be done according to:
>     http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq
>
>     I have some functions that could help you along the way
>     (or even automatise the whole procedure), you can con-
>     tact me if you decide to do cluster statistics directly in
>     FieldTrip.
>     Nevertheless, the FieldTrip output should be present somewhere
>     in the workspace or at least be possible to catch in a script (if not
>     it is still possible to modify one of the EEGlab functions to
>     return or
>     eval in your base workspace the information about cluster statistics).
>
>     Mikolaj
>
>     Pozdrawiam,
>     Miko?aj Magnuski
>
>
>     2013/6/19 Felix Ball <Felix.Ball at hu-berlin.de
>     <mailto:Felix.Ball at hu-berlin.de>>
>
>         Dear list,
>
>         Thank you in advance for your help. I currently try to use the
>         STUDY function and especially the non-parametric test (Maris
>         and Oostenveld cluster statistic). I have an experiment with
>         two conditions and n subjects. What I want to know is at which
>         time points and at which electrodes the two conditions differ
>         from each other. The difference between conditions is
>         investigated on the grand average level.
>         I read about a method introduced by Maris and Oostenveld and
>         it seems to be perfect for my needs and it is already
>         implemented in EEGLab. What I get with EEGLab (see matlab
>         code) is a plot (see figure C1vsC2) with different time
>         intervals marked in grey for each electrode. These grey shaded
>         areas are, as far as I understood, significant differences
>         between conditions. Furthermore, they are in a time range
>         where I expected to find a significant difference between
>         conditions. Now I have 2 questions:
>
>         1) I want to access the statistics that are the basis of this
>         plot. Does someone know where I can find them or do I have
>         bugs in my code, preventing me from accessing the stats
>         variables? I was not able to find any variable in my workspace
>         resembling the results shown in figure C1vsC2.
>
>         2) The result I expected (after reading the Maris and
>         Oostenveld paper), slightly differs from the result I receive.
>         I expected only one cluster of neighbor electrodes and one
>         continuous time interval to be shaded in grey in the plot.
>         This cluster- time interval combination would be the maximum
>         effect between conditions. However, looking at figure C1vsC2,
>         I see that neighbor electrodes have a grey shaded areas, but
>         these areas are not necessarily continuous and are not equal
>         for all electrodes. If I just look at one electrode, e.g. FC3
>         (see appendix), I see that the time range is sometimes
>         interrupted. How do I know when conditions start and stop to
>         be significantly different, if there is not only one time
>         interval of significant difference? I need to know the time
>         range because I want to pick the mean amplitude (in the time
>         range) for a regression analysis.
>
>         Thank you for your help and kind regards. felix
>
>
>         _______________________________________________
>         Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>         To unsubscribe, send an empty email to
>         eeglablist-unsubscribe at sccn.ucsd.edu
>         <mailto: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
>         <mailto:eeglablist-request at sccn.ucsd.edu>
>
>
>
>
>
> -- 
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20130626/56fdf447/attachment.html>


More information about the eeglablist mailing list