[FieldTrip] Subject: conditional granger causality

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Fri Jun 28 09:46:23 CEST 2019


Hi Edoardo,

As I alluded to in an earlier message, the conditional granger is indeed poorly documented, and can behave unpredictably if one does not know what he/she is doing.
I think a good prerequisite for being able to appreciate the algorithmic and implementational limitations would be the faculty to figure out from the code how stuff needs to be specified.

So my question back would be, what have you tried so far, and have you read the code in detail? Doing some detective work, you will probably have noticed that ft_connectivityanalysis sends you into ft_connectivity_csd2transfer, which basically tries to guess what the required bivariate-block and trivariate-block wise combinations should be, if ‘conditional’ is specified to yes. Then, further down in the code (let’s say, for the sake of it, around line 281) the actual computations take place, where possibly some hints are given as to how to specify the cfg.block struct-array.

If you dig into it a little bit, you will be rewarded! Please don’t forget to consider writing a piece of documentation for on the website (e.g. as an example script or a FAQ) for future reference.

Good luck and happy computing.

Jan-Mathijs



> On 27 Jun 2019, at 18:34, Edoardo Pinzuti <edoardo.pinzuti at gmail.com> wrote:
> 
> Dear all,
> 
> Looking at the code for conditional spectral Granger it looks like that if one want to derive GC from s1 to s2 conditional on the rest e.g. s3, the nonparametric spectral factorization is computed on cross-spectral matrix containing all s1,s2,s3  and  on cross-spectral matrix containing s2 and s3. These two factorization are used to derive GC from s1 to s2 conditional on the rest. 
> 
> Suppose s1  has two components:  s1a and s1b , s2 as well: s2a and s2b and so on, I would like to compute the conditional Granger as before from s1 to s2 using a blockwise approach (where s1a and s1b are one block etc). These can be done with  cfg.granger.block and channels combination ?  
> Since it is poorly documented someone can provide a simple example 
> 
> cfg.channel={'s1a','s1b','s2a','s2b','s3a','s3b'}
> 
>  cfg = [];
>  cfg.method = 'granger';
>  cfg.granger.sfmethod='multivariate';
>  cfg.granger.conditional='yes';
>  cfg.channelcmb = { ??     };   
>  cfg.granger.block = ??          
>  g_stopCond = ft_connectivityanalysis(cfg, freq);
> 
> thanks
> Edoardo
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202


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


More information about the fieldtrip mailing list