[FieldTrip] Query Regarding Granger Causality Calculation in FieldTrip Toolbox

Yegane Modaresnia yeganemodaressnia at gmail.com
Fri Oct 20 19:31:36 CEST 2023


Dear Fieldtrip team,

I hope this message finds you well. I am currently working on calculating
the effective connectivity between sources using Granger causality in the
FieldTrip toolbox. I have been using the following code:

cfg         = [];
cfg.method  ='granger';
% cfg.complex = 'absimag';
source_conn = ft_connectivityanalysis(cfg, source);
figure(9);imagesc(source_conn.cohspctrm);

However, I have encountered an error message:
"This function requires 'mvar', 'freqmvar' or 'freq' data as input, see
ft_datatype_mvar or ft_datatype_freq."

Upon inspecting the ft_connectivityanalysis function, I noticed that it
accepts either two inputs in the form of (cfg, source) or (cfg, freq). My
confusion lies in understanding how to define 'freq' before applying this
Granger causality code, and how this relates to the 'source' data.

Could you kindly provide some guidance or insights on how to properly
handle the frequency data in conjunction with the source data for this
granger connectivity analysis?

Thank you very much for your assistance.

Warm regards,
Yeganeh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20231020/91695b49/attachment.htm>


More information about the fieldtrip mailing list