[FieldTrip] NaN Values in Granger Causality

Helen Wieffering helen.wieffering at gmail.com
Fri Nov 13 22:56:33 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 our 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 wavelet analysiscfg
= [];cfg.method = 'wavelet';cfg.channelcmb = {'all' 'all'};cfg.channel =
{'source01' 'source01'};cfg.fsample = 250;cfg.output =
'powandcsd';cfg.tapsmofrq = 2;cfg.foi = 0:1:8;                      cfg.toi
= -0.5:0.004:1.5;           freq = ft_freqanalysis(cfg, data);*

Note: I've checked the values in freq.powspctrm, and though there are NaNs
there is real data, too.














*% 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 insight is much appreciated - thanks!

Best,

Helen Wieffering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151113/db49c24f/attachment.html>


More information about the fieldtrip mailing list