[FieldTrip] Cluster-Statistics on wPLI data
Tzvetan Popov
tzvetan.popov at uni-konstanz.de
Tue Jun 2 10:28:32 CEST 2015
Hi Mathis,
alternatively you could use ft_sourcestatistics. For this you should reduce your 600 x 600 x freq matrix to freq of interest first. Next, the resulting 600 x 600 matrix you’d reduce to 600 x 1 where each grid point has a mean connectivity value to all possible grid points.
>From then on you could use ft_sourcestatistics and ft_sourceinterpolate to visualize.
Good luck,
Tzvetan
> Dear Fieldtrip Users,
>
> I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question:
>
> I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below).
>
> The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets.
>
> I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this?
> Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach?
>
> Thanks for any input, best wishes,
> Mathis Kaiser
>
>> %% tfr and wpli per subject
>>
>> cfg = [];
>> cfg.keeptrials = 'yes';
>> cfg.output = 'fourier';
>> cfg.foi = 2:20;
>> cfg.method = 'mtmfft';
>> cfg.taper = 'hanning';
>>
>> tfr4conn_ill = ft_freqanalysis(cfg, virt_ill);
>> tfr4conn_noill = ft_freqanalysis(cfg, virt_noill);
>>
>> cfg = [];
>> cfg.method = 'wpli_debiased';
>>
>> wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill);
>> wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill);
> ###
>> % (I then load all individual datasets into two cell arrays - all_wpli_ill and all_wpli_noill):
>> >> display(all_wpli_ill{1})
>> label: {638x1 cell}
>> dimord: 'chan_chan_freq'
>> wpli_debiasedspctrm: [638x638x10 double]
>> freq: [1x10 double]
>> elec: [1x1 struct]
>> cfg: [1x1 struct]
>>
> ###
>>
>> %% statistics
>>
>> cfg = [];
>> cfg.parameter = 'wpli_debiasedspctrm';
>> cfg.statistic = 'depsamplesT';
>> cfg.method = 'montecarlo';
>> cfg.correctm = 'cluster';
>> cfg.frequency = [10 10];
>> cfg.neighbours = []; % no spatial clustering
>> cfg.numrandomization = 1000;
>> cfg.correcttail = 'alpha';
>> nSub = length(subj);
>> cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)];
>> cfg.design(2,1:2*nSub) = [1:nSub 1:nSub];
>> cfg.ivar = 1;
>> cfg.uvar = 2;
>>
>> stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:});
> ###
>> >> display(stat)
>>
>> stat =
>>
>> prob: [638x638 double]
>> posclusters: [1x4662 struct]
>> posclusterslabelmat: [638x638 double]
>> posdistribution: [1x1000 double]
>> negclusters: [1x12943 struct]
>> negclusterslabelmat: [638x638 double]
>> negdistribution: [1x1000 double]
>> cirange: [638x638 double]
>> mask: [638x638 logical]
>> stat: [638x638 double]
>> ref: [638x638 double]
>> dimord: 'chan_chan'
>> label: {638x1 cell}
>> freq: 9.9602
>> cfg: [1x1 struct]
>>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
More information about the fieldtrip
mailing list