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

Herring, J.D. (Jim) j.herring at donders.ru.nl
Mon Dec 7 09:24:32 CET 2015


Dear Ronny,

What error do you get when running this code?

You can perform a (relative) baseline correction using ft_freqbaseline with cfg.baselinetype = ‘relative’ or ‘relchange’ and cfg.baseline = [your baseline window];. If your code works on absolute values it should also work on baseline-corrected values using ft_freqbaseline.

Best,

Jim

From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ronny Ibrahim
Sent: maandag 7 december 2015 5:36
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] Clusterstatistics on relative change (%) time frequency data

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/fc49f7b3/attachment-0001.html>


More information about the fieldtrip mailing list