[FieldTrip] Clusterstatistics on relative change (%) time frequency data

Ronny Ibrahim ronny.ibrahim at mq.edu.au
Mon Dec 7 05:36:14 CET 2015


Dear fellow fieldtrip users,
I would like to implement a clusterstatistics independentT test on a
time-frequency datasets that I've acquired using the ft_freqanalysis
function. When I run ft_freqstatistics on the data it would give me stats
result which is based on comparing the absolute values of power spectrum
instead the relative change with respect to the baseline. I have tried to
perform to do my relative change power spectrum data manually but it seems
that when I run the ft_freqstatistics it produces an error of which I could
not figure out on why.

Here is my code:



C_1 = {outP10{1} outP10{2} outP10{3} outP10{4} outP10{5} outP10{6}
outP10{7} outP10{8} outP10{9} outP10{10} outP10{11} outP10{12} outP10{13}
outP10{14} outP10{15} outP10{16} outP10{17} outP10{18}};



C_2 = {outM10{1} outM10{2} outM10{3} outM10{4} outM10{5} outM10{6}
outM10{7} outM10{8} outM10{9} outM10{10} outM10{11} outM10{12} outM10{13}
outM10{14} outM10{15} outM10{16} outM10{17} outM10{18}};



%% Performing cluster statistics for the paradigm

cfg                  = [];

cfg.layout           = 'EEG_KR.lay';

lay                  = ft_prepare_layout(cfg);

% Needs to change this

cfg.latency          = [0 0.6]; %Need to look this up according to what

cfg.frequency        = [8 12];% Need to do it for different frequency bands
(theta, alpha, beta, gamma).

cfg.channel          = 'all';

cfg.avgovertime      = 'no';

cfg.avgoverfreq      = 'yes';

cfg.avgoverchan      = 'no';

cfg.statistic        = 'ft_statfun_indepsamplesT';

cfg.numrandomization = 1000;

cfg.correctm         = 'cluster';

cfg.method           = 'montecarlo';

cfg.computeprob    = 'yes';

cfg.computecritval = 'yes';

cfg.clusteralpha     = 0.05;

cfg.clusterstatistic = 'maxsum';

cfg.minnbchan        = 3;

cfg.tail             = 0;

cfg.clustertail      = 0;

cfg.alpha            = 0.05;

cfg_neighb.layout    = lay;

cfg_neighb.method    = 'triangulation';

cfg.neighbours       = ft_prepare_neighbours(cfg_neighb);

cfg.ivar             = 1;

cfg.design = [ones(1,18) 2*ones(1,18)];

stat                 = ft_freqstatistics(cfg, C_2{:}, C_1{:});



%% Plotting significant clusters



cfg                  = [];

cfg.alpha            = 0.05;

cfg.parameter        = 'stat';

cfg.layout           = lay;

ft_clusterplot(cfg, stat);


where the variable out is essentially my time-frequency data output
structure.

I would greatly appreciate the input and assistance. Thank you.

Kind Regards,

Ronny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151207/0f449a13/attachment.html>


More information about the fieldtrip mailing list