[FieldTrip] Inquiry About Default Model in Granger Causality Analysis

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Fri Jun 14 19:59:32 CEST 2024


Hi Jeff,

I agree that the documentation regarding several ways to compute transfer-function derived connectivity metrics is a bit sparse.

On 13 Jun 2024, at 15:30, Jeff via fieldtrip <fieldtrip at science.ru.nl> wrote:


To whom it may concern,

I hope this message finds you well. I am writing to seek assistance regarding the computation of frequency-domain Granger causality using non-parametric methods as described in the FieldTrip tutorial documentation. Specifically, I am interested in the section on conditional Granger causality (https://www.fieldtriptoolbox.org/example/connectivity_conditional_granger/<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fexample%2Fconnectivity_conditional_granger%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdfcfff4cecf443e0b05808dc8c9bbe5e%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638539847739380313%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=001av91qmwyS7Xfgokx2rno7%2FIG8H0EwfPjEgWu3Wmg%3D&reserved=0>).

In the tutorial, the code explicitly specifies whether to use a bivariate or multivariate model, whereas other sections of the documentation (e.g., https://www.fieldtriptoolbox.org/tutorial/connectivityextended/#introduction<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ftutorial%2Fconnectivityextended%2F%23introduction&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdfcfff4cecf443e0b05808dc8c9bbe5e%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638539847739380313%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=wIJqzH6RAekNXNhpvtSnGR5X8B0yrAYCECpQ2T09I9Q%3D&reserved=0>) do not explicitly state this. My question is: when the model type (bivariate or multivariate) is not explicitly stated, which model does FieldTrip use by default?

If you seek to do non-parametric spectral factorization on a data structure with N-channels -> multivariate, because the default of cfg.sfmethod = ‘multivariate'
If you seek to do parametric estimation (where the data goes through ft_mvaranalysis, which by default does a multivariate AR model) -> also multivariate


To investigate this, I conducted a small test. I found that specifying "cfg.granger.sfmethod = 'bivariate';" produced different directed connectivity results etween electrode pairs compared to when "cfg.granger.sfmethod" was not specified. This test was conducted using the non-parametric Granger method. However, when using the parametric method as the tutorial, I found that specifying "cfg.granger.sfmethod = 'bivariate';" in "ft_connectivityanalysis" resulted in an error.

This is because sfmethod parameter’s value refers to how the spectral factorization is to be performed. This is essentially non-parametric, so the combination and cfg don’t make sense in your particular test case.

A ‘bivariate’ decomposition of the spectral matrix, or equivalently a bivariate AR-model (i.e. estimated per pair of channels, if ft_mvaranalysis is supplied with a cfg.channelcmb field) will  yield a different result for the estimated connectivity between channels A and B, as compared to a situation where the spectral matrix decomposition was done, with - say - a channel C present (or equivalently, when the AR-model is estimated in a multivariate sense). I think that there are ample explanations about this in the literature, but the gist of it is that any latent sources (e.g. source C not modelled along in the bivariate case) will influence the actual estimate between A and B.

On the other hand, the higher the dimensionality of the decomposition challenge at hand (i.e. # of channels, often poorly unmixed) the less informative the spectral transfer functions / AR-model coefficients (or often the model does not converge meaningfully at all).

Best wishes,
Jan-Mathijs


Here is the code for my non-parametric Granger causality test:

cfg.toilim = [0.5 1.5];
data = ft_redefinetrial(cfg, data);

cfg        = [];
cfg.method ='mtmfft';
cfg.taper     = 'dpss';
cfg.output    = 'fourier';
cfg.tapsmofrq = 2;
mfreq   = ft_freqanalysis(cfg, data);

cfg           = [];
cfg.method    = 'granger';
cfg.granger.conditional = 'no';
cfg.granger.sfmethod = 'bivariate';
mgranger_bivar      = ft_connectivityanalysis(cfg, mfreq);

cfg           = [];
cfg.method    = 'granger';
mgranger_default      = ft_connectivityanalysis(cfg, mfreq);


Additionally, here is the code using the parametric Granger method, which does not allow explicit specification of "cfg.granger.sfmethod = 'bivariate';":

cfg         = [];
cfg.order   = 5;
cfg.toolbox = 'bsmart';
mdata       = ft_mvaranalysis(cfg, data);

cfg        = [];
cfg.method = 'mvar';
mfreq_para      = ft_freqanalysis(cfg, mdata);

cfg           = [];
cfg.method    = 'granger';
% cfg.granger.conditional = 'no'; %error
% cfg.granger.sfmethod = 'bivariate';%error
granger_para       = ft_connectivityanalysis(cfg, mfreq_para);

I would greatly appreciate any guidance or recommendations on how to address this issue and understand the default model used by FieldTrip when not explicitly specified. My core question is whether the traditional bivariate model is used by default when the model type (bivariate or multivariate) is not specified, regardless of whether a parametric or non-parametric Granger method is employed. If the default is indeed the bivariate model, why do the results differ from those obtained when explicitly specifying the model as bivariate(with non-parametric Granger method)? Additionally, any insights on resolving the error encountered when specifying the bivariate model in the parametric method would be extremely helpful.

Thank you very much for your time and assistance.

Best regards,

Chengyuan Wu


_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240614/b493fc59/attachment.htm>


More information about the fieldtrip mailing list