[FieldTrip] ft_clusterplot error?
Jac Billington
J.Billington at leeds.ac.uk
Fri Jan 18 19:07:04 CET 2019
Dear experts,
I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot.
An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0
My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct?
I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong.
My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this.
Thank you in advance. Jac
% load data (from ft_freqanalysis)
load(filename1);
con1= freqScaling
load(filename2);
con2=freqScaling;
%%%% run the stats:
cfg = [];
cfg.channel = 'all';
cfg.latency = [4 6];
cfg.frequency = [8 12];
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_indepsamplesT';
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 = 500;
cfg.avgoverchan = 'no'
cfg.avgovertime = 'yes'
cfg.avgoverfreq = 'yes'
% prepare_neighbours determines what sensors may form clusters
cfg_neighb.method = 'distance';
cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec);
design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1));
design(1,1:size(con1.powspctrm,1)) = 1;
design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2;
cfg.design = design;
cfg.ivar = 1;
[stat] = ft_freqstatistics(cfg, con1, con2);
cfg=[]
cfg.keeptrials = 'no'
cfg.latency = [4 6];
cfg.frequency = [8 12];
con1 = ft_freqdescriptives(cfg, con1);
con2 = ft_freqdescriptives(cfg, con2);
%%%% resize powerspec to avoid dimord error. Collapse freq/ time
con1rs=mean(con1.powspctrm,3) %%% collapse time dim
con2rs=mean(con2.powspctrm,3) %%% collapse time dim
con1rs=mean(con1rs,2) %%% collapse freq
con2rs=mean(con2rs,2)
stat.raweffect = con1rs-con2rs
cfg.alpha = 0.025;
cfg.zparam = 'raweffect';
cfg.zlim = [-1 3];
cfg.layout = 'biosemi64.lay';
cfg.subplotsize = ([1 1]);
ft_clusterplot(cfg, stat);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190118/83d4360c/attachment-0001.html>
More information about the fieldtrip
mailing list