<div dir="ltr"><div><div><div><div>Dear Fieldtrip users,<br><br></div>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.<br><br></div>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. <br><br></div>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.<br><br><i>data = <br>label: {2x1 cell}<br>trial: {1x155 cell}<br>time: {1x155 cell}<br>fsample: 250<br>cfg: [1x1 struct]<br>sampleinfo: [155x2 double]<br><br>% perform wavelet analysis<br>cfg = [];<br>cfg.method = 'wavelet';<br>cfg.channelcmb = {'all' 'all'};<br>cfg.channel = {'source01' 'source01'};<br>cfg.fsample = 250;<br>cfg.output = 'powandcsd';<br>cfg.tapsmofrq = 2;<br>cfg.foi = 0:1:8;                      <br>cfg.toi = -0.5:0.004:1.5;           <br>freq = ft_freqanalysis(cfg, data);</i><br><br></div>Note: I've checked the values in freq.powspctrm, and though there are NaNs there is real data, too.<br><div><br><i>% compute granger causality<br>cfg = [];<br>cfg.method = 'granger';<br>cfg.channel = {'source01' 'source02'};<br>cfg.channelcmb = {'all' 'all'};<br>granger = ft_connectivityanalysis(cfg, freq);<br><br>% plot<br>cfg = [];<br>cfg.parameter = 'grangerspctrm';<br>cfg.zlim = [0 .5];<br>cfg.refchannel = 'source02';<br>cfg.directionality = 'outflow';<br>ft_singleplotTFR(cfg, granger);</i><br><br></div><div>However, this plot is a blank no matter which values I seem to choose as a zlim.<br><br></div><div>Any insight is much appreciated - thanks!<br><br></div><div>Best,<br><br></div><div>Helen Wieffering<br></div><div><br><br><br><br><br><br><br><br></div></div>