[FieldTrip] clusterstat on multiple frequencies

Zita Eva Patai eva.patai at psy.ox.ac.uk
Mon Dec 12 12:22:57 CET 2011


Dear Jan-Mathijs,

Sorry I was so vague, i thought maybe it was a common problem...

OK, so i was running a clusterstat with the following input ( main point, i
want to look at the difference between conditions over a set of frequencies)
***

load blk1_tf_avg

load blk3_tf_avg


cfg = [];

cfg.latency          = [1.0 1.5 ];

cfg.frequency        = [4 8];

cfg.method           = 'montecarlo';

cfg.statistic        = 'depsamplesT';

cfg.correctm         = 'cluster';

cfg.clusteralpha     = 0.05;

cfg.clusterstatistic = 'maxsum';

cfg.minnbchan        = 2;

cfg.tail             = 0;

cfg.clustertail      = 0;

cfg.alpha            = 0.025;

cfg.numrandomization = 1000;

cfg.feedback = 'yes';

cfg.neighbours       = ft_neighbourselection(cfg, blk1_tf_avg);

subj = 15;

design = zeros(2,2*subj);

for i = 1:subj

  design(1,i) = i;

end

for i = 1:subj

  design(1,subj+i) = i;

end

design(2,1:subj)        = 1;

design(2,subj+1:2*subj) = 2;




cfg.design   = design;

cfg.uvar     = 1;

cfg.ivar     = 2;



[stat] = ft_freqstatistics(cfg, blk3_tf_avg, blk1_tf_avg);



save stat_tf_theta_1000_1500_bkey3vsbkey1 stat


***

The error comes during the plotting phase when it says that i should not
have multiple frequencies, as the data should be averaged across
frequencies. And it does save my file (stat_theta....) but and i can see
the pos/neg clusters in the data structure...but i can't plot with :

cfg = [];

cfg.highlightsymbolseries = ['*','*','.','.','.'];

cfg.layout = '/Applications/fieldtrip/template/neuromag306mag.lay';

cfg.contournum = 0;

cfg.markersymbol = '.';

cfg.alpha = 0.05;

cfg.zparam = 'stat';

ft_clusterplot(cfg,stat);




I have also tried plotting with the script from the tutorial

pos_cluster_pvals = [stat.posclusters(:).prob];

pos_signif_clust = find(pos_cluster_pvals < stat.cfg.alpha);

pos = ismember(stat.posclusterslabelmat, pos_signif_clust);



neg_cluster_pvals = [stat.negclusters(:).prob];

neg_signif_clust = find(neg_cluster_pvals < stat.cfg.alpha);

neg = ismember(stat.negclusterslabelmat, neg_signif_clust);

for k = 1:20;

etc.
but this makes the plot really weird looking...and i am not sure how i can
only plot the data from the frequencies i would like to display (in this
case 4-8Hz). I know how to make the subtraction image (between my two
conditions), but not how to specify the frequency range that i want
displayed...

If this is too complicated, is there a way to average over a set of
frequencies in the data, and then just input files into the permutation
test that are already collapsed across the frequency range i am interested
in?


Thank  you!
z


On Mon, Dec 12, 2011 at 7:59 AM, jan-mathijs schoffelen <
jan.schoffelen at donders.ru.nl> wrote:

> Hi Zita,
>
> Could you provide some more information please? What plotting function are
> you using? What does the stat-structure look like etc.? With sufficient
> additional information we can try and reproduce the problem, and if it's a
> bug fix it. If it's not a bug, we may give you some hints to fool the
> system...
>
> BW,
>
> Jan-Mathijs
>
> On Dec 11, 2011, at 8:28 PM, Zita Eva Patai wrote:
>
> Dear FT-ers,
>
> I have tried to run a permutation test on time-frequency data, and would
> have like to see a statistical evealuation over a set of frequencies (ex:
> 4-8Hz)
>
> It seems that the test itself runs, but it crashes when i try to plot the
> data, saying that 'stat' must not contain multiple frequencies.
>
> I was wondering if there was a way to evaluate the difference between two
> conditions over a set range of frequencies?
>
> Thank you!
> zita
>
>
> --
>
> Zita Patai
> DPhil Candidate, Experimental Psychology
> University of Oxford
> bcl.psy.ox.ac.uk/people/zita-eva-patai/
> eva.patai at psy.ox.ac.uk
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> Jan-Mathijs Schoffelen, MD PhD
>
> Donders Institute for Brain, Cognition and Behaviour,
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
>
> Max Planck Institute for Psycholinguistics,
> Nijmegen, The Netherlands
>
> J.Schoffelen at donders.ru.nl
> Telephone: +31-24-3614793
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 

Zita Patai
DPhil Candidate, Experimental Psychology
University of Oxford
bcl.psy.ox.ac.uk/people/zita-eva-patai/
eva.patai at psy.ox.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111212/d27b4a9a/attachment-0002.html>


More information about the fieldtrip mailing list