[FieldTrip] Question regarding nonparametric testing for coherence differences

Eelke Spaak eelke.spaak at donders.ru.nl
Wed Aug 27 10:04:18 CEST 2014


Dear Hweeling,

I'm not sure if I understand all your questions correctly, but I can
give two pointers that might be of help.

First, the error message you get when trying to plot ("no reference
channel is specified") tells you what you should do: specify a
reference channel :) Connectivity is between channels, so if you want
to plot a spatial topography, you are plotting connectivity of all
channels versus *one* channel, which is called the reference channel.
You can do this with cfg.refchannel = 'chan'. You might want to take a
look at this part of our tutorials:
http://fieldtrip.fcdonders.nl/tutorial/sensor_analysis#cortico-muscular_coherence
where plotting connectivity data is explained.

Second, I see that you are using cfg.alpha = 0.05/8, implementing
Bonferroni correction for multiple comparisons. Cluster statistics is
already a way of dealing with multiple comparisons (i.e. the cluster
test is a single test), so there is no need for this. (Unless you are
iteratively doing cluster statistics across some dimension, but your
code suggests to me that is not the case.)

Hope that helps.

Best,
Eelke

On 24 August 2014 14:15, Hwee Ling Lee <hweeling.lee at gmail.com> wrote:
> Dear all and Prof Maris,
>
> I'm re-posting this question again, as I didn't get any replies previously.
>
> I’m interested to investigate if there are any differences in phase
> synchronization in resting state data at timepoint 2 versus timepoint 1. The
> EEG data was collected using 64 EEG channels, resting state, eyes opened and
> eyes closed. I’ve arbitrarily segmented the resting state data into epochs
> of 2s each, and the epochs with artifacts are excluded completely from
> further analyses. I then performed mtmfft to get the fourier representation
> of the data, extracted the coherence, and compared the coherence difference
> of timepoint 2 versus timepoint 1 of all channels paired with all other
> channels.
>
> I figured that if I extract the connectivity analyses without specifying the
> channelcmb, I get a 'chan_chan_freq' dimord variable that would allow me to
> perform cluster-based statistical analyses. I get an output with ‘chan_chan’
> dimord variable. However, I was not 100% sure that this is correct, hence,
> I’ve inserted my code (see below). It’ll be great if you could tell me if
> what I’m doing makes any sense at all. Also, I don’t know how I can plot the
> results to see if it make any sense at all.
>
> Also, I checked the values obtained from when I specified "cfg.channelcmb"
> and when I did not specify "cfg.channelcmb", I noticed that the values were
> somehow different. I would assume that the values to be similar, although
> I'm not sure why they would have differences in the values obtained from
> specifying "cfg.channelcmb".
>
> This is my code that I've used thus far:
>
> for sub = 1:5
>
>     cfg                 = [];
>
>     cfg.output          = 'fourier';
>
>     cfg.channel         = {'all'};
>
>     cfg.method          = 'mtmfft';
>
>     cfg.keeptrials      = 'yes';
>
>     cfg.tapsmofrq       = 5;
>
>        cfg.foilim          = [0 100];
>
>     cfg.taper           = 'dpss';
>
>     % find the index for the c200 condition
>
>    pre_c200_idx = find(data5.trialinfo == 201);
>
>     cfg.trials          = pre_c200_idx;
>
>     HLF_pre_c200         = ft_freqanalysis(cfg, data5);
>
> post_c200_idx = find(data5.trialinfo == 200);
>
>     cfg.trials          = post_c200_idx;
>
>     HLF_post_c200         = ft_freqanalysis(cfg, data5);
>
>
>
> cfg                 = [];
>
>     cfg.keeptrials      = 'no';
>
>     cfg.channel         = {'all'};
>
>     cfg.removemean      = 'yes';
>
>     cfg.method           = 'coh';
>
>     HLF_pre_c200coh{sub}      = ft_connectivityanalysis(cfg, HLF_pre_c200);
>
>     HLF_post_c200coh{sub}      = ft_connectivityanalysis(cfg,
> HLF_post_c200);
>
> end
>
>
>
> load('D:\Hweeling_Programs\fieldtrip-20140330\template\layout\easycapM11.mat');
>
> cfg_neighb.method = 'template';
>
> cfg_neighb.layout = lay;
>
> cfg_neighb.channel = 'all';
>
> neighbours = ft_prepare_neighbours(cfg_neighb, sub_HLF_pre_c200coh{1});
>
>
>
> cfg = [];
>
> cfg.layout = lay;
>
> cfg.neighbours = neighbours;
>
> cfg.channel = 'all';
>
> cfg.channelcmb = {cfg.channel, cfg.channel};
>
> cfg.latency = 'all';
>
> cfg.avgovertime = 'no';
>
> cfg.avgoverchan = 'no';
>
> cfg.parameter = 'cohspctrm';
>
> cfg.method = 'montecarlo';
>
> cfg.statistic = 'depsamplesT';
>
> cfg.correctm = 'cluster';
>
> cfg.tail = 0;
>
> % cfg.clustertail = 0;
>
> cfg.alpha = 0.05/8; % to correct for multiple comparisons across 8 frequency
> bands.
>
> cfg.numrandomization = 10000;
>
> cfg.ivar = 2;
>
> cfg.uvar = 1;
>
>
>
> % design matrices
>
> clear design;
>
> design(1,:) = [1:5, 1:5];
>
> design(2,:) = [ones(1,5), ones(1,5) * 2];
>
> cfg.design = design;
>
> % for theta band
>
> cfg.avgoverfreq = 'yes';
>
> cfg.frequency = [4 8]; % I also performed the statistics for delta (2-4),
> alpha (8-10.5), alpha (10.5-13), beta (13-20), beta (20-30), gamma (30-40),
> and gamma (40-100).
>
> [diffc200_theta_stat] = ft_freqstatistics(cfg, sub_HLF_post_c200coh{:},
> sub_HLF_pre_c200coh{:});
>
>
> When I tried to plot the results, I used this code:
>
> cfg = [];
>
> cfg.channel = 'all';
>
> cfg.layout = 'lay';
>
> cfg.zlim = [-1 1];
>
> cfg.alpha = 0.05;
>
> cfg.refchannel = 'all';
>
> ft_clusterplot(cfg, diffc200_theta_stat);
>
> However, I was not sure how I could plot the results. I get an error message
> from Fieldtrip when using ft_clusterplot:
>
> Error using topoplot_common (line 366)
>
> no reference channel is specified
>
> Error in ft_topoplotTFR (line 192)
>
> [cfg] = topoplot_common(cfg, varargin{:});
>
> Error in ft_clusterplot (line 372)
>
>       ft_topoplotTFR(cfgtopo, stat);
>
>
>
> According to your paper in 2007, the topoplot of the results were masked by
> the spatio-spectral pattern of the significant clusters. I don't know how to
> do this, and I would really appreciate if you can show me how to make such a
> plot.
>
> Thank you very much.
>
> Kind regards,
>
> Hweeling
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list