Note that this reference documentation is identical to the help that is displayed in Matlab when you type “help ft_connectivity_granger”.
FT_CONNECTIVITY_GRANGER computes spectrally resolved granger causality. Use as [GRANGER, V, N] = FT_CONNECTIVITY_GRANGER(H, Z, S, key1, value1, ...) where H is the spectral transfer matrix, Nrpt x Nchan x Nchan x Nfreq (x Ntime), or Nrpt x Nchancmb x Nfreq (x Ntime). Nrpt can be 1. Z is the covariance matrix of the noise, Nrpt x Nchan x Nchan (x Ntime), or Nrpt x Nchancmb (x Ntime). S is the cross-spectral density matrix, same dimensionality as H additional options need to be specified as key-value pairs and are: 'dimord' = required string specifying how to interpret the input data supported values are 'rpt_chan_chan_freq(_time) and 'rpt_chan_freq(_time), 'rpt_pos_pos_XXX' and 'rpt_pos_XXX' 'method' = 'granger' (default), or 'instantaneous', or 'total'. 'hasjack' = 0 (default) is a boolean specifying whether the input contains leave-one-outs, required for correct variance estimate 'powindx' = is a variable determining the exact computation, see below If the inputdata is such that the channel-pairs are linearly indexed, granger causality is computed per quadruplet of consecutive entries, where the convention is as follows: H(:, (k-1)*4 + 1, :, :, :) -> 'chan1-chan1' H(:, (k-1)*4 + 2, :, :, :) -> 'chan1->chan2' H(:, (k-1)*4 + 3, :, :, :) -> 'chan2->chan1' H(:, (k-1)*4 + 4, :, :, :) -> 'chan2->chan2' The same holds for the Z and S matrices. Pairwise block-granger causality can be computed when the inputdata has dimensionality Nchan x Nchan. In that case powindx should be specified, as a 1x2 cell-array indexing the individual channels that go into each 'block'.
Share this page: