[FieldTrip] NaNs in Granger Spectrum

Helen Wieffering helen.wieffering at gmail.com
Wed Nov 18 15:46:48 CET 2015


Dear Fieldtrip users,

I am working with a 128 channel EEG data and am currently in the process of
calculating non-parametric Granger causality measures. I am following the
steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage.

However, I'm facing the curious problem that my output data from calling
ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does
anyone have insight as to why that might be? I've tried playing around with
cfg.toi and the location of our virtual channels, but neither seems to
help.

My code is below, where 'source01' and 'source02' refer to virtual channels
we created based off powspctrm data from beamformer source localization on
our own data, according to steps outlined in the FT connectivity tutorial.




















*data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample:
250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper
analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all'
'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output =
'powandcsd';cfg.foi = 0:1:20;                      cfg.toi =
-0.5:0.004:1.5;       cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./
cfg.foi;            freq = ft_freqanalysis(cfg, data_both);*

Note: I've checked the values in freq.powspctrm, and though there are NaNs
around the temporal edges, there is real data amid the time frame of
interest. I've attached a sample TFR plot.














*% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel =
{'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger =
ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter =
'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel =
'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);*

However, this plot is a blank no matter which values I seem to choose as a
zlim.

Any tips are much appreciated - thanks!

(Please excuse my re-posting of a similar message twice - I'm simply hoping
to catch a few more responses. As far as I can tell, this issue has not yet
been addressed in the digest archives - though if I'm mistaken please feel
free to point me to the appropriate thread!)

Best,

Helen Wieffering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151118/0dff8b4f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: source01TFR.jpg
Type: image/jpeg
Size: 49523 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151118/0dff8b4f/attachment-0001.jpg>


More information about the fieldtrip mailing list