autocov_to_smvgc
Calculate conditional frequency-domain MVGC (spectral multivariate Granger causality)
Syntax
[f,fres] = autocov_to_smvgc(G,x,y,fres,useFFT)
Arguments
See also Common variable names and data structures.
input
G autocovariance sequence x vector of indices of target (causee) multi-variable y vector of indices of source (causal) multi-variable fres frequency resolution (default: automatic) useFFT use FFT method for autocovariance transform (default: as for autocov_xform)
output
f spectral Granger causality
Description
Returns the frequency-domain (spectral) MVGC
from the variable Y (specified by the vector of indices y) to the variable X (specified by the vector of indices x), conditional on all other variables Z represented in G, for a stationary VAR process with autocovariance sequence G.
Spectral causality is calculated up to the Nyqvist frequency at a resolution fres. If fres is not supplied it is calculated optimally as the number of autocovariance lags. Call freqs = sfreqs(fres,fs), where fs is the sampling rate, to get a corresponding vector freqs of frequencies on [0,fs/2].
The useFFT flag specifies the algorithm used to transform the autocovariance sequence; see autocov_xform for details.
In the conditional case, the algorithm works by transforming the autocovariance sequence for the full regression (see autocov_xform) to an autocovariance sequence for new X,Z variables defined as residuals of the reduced regression; thus a separate estimation step for the reduced regression, which is known to be problematic [2,*], is unnecessary, resulting in high efficiency and accuracy. See [1] for details.
The caller should take note of any warnings issued by this function and test results with a call isbad|(f,false)|.
References
[1] L. Barnett and A. K. Seth, The MVGC Multivariate Granger Causality Toolbox: A New Approach to Granger-causal Inference, J. Neurosci. Methods 223, 2014 [ preprint ].
[2] Y. Chen, S. L. Bressler and M. Ding, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", J. Neurosci. Methods, 150, 2006.
[*] In our experience the "partition matrix" method in ref. [2] appears to be unsound, producing inaccurate results; hence we do not use it here.
See also
autocov_to_var | var_to_cpsd | autocov_xform | var2trfun | sfreqs | isbad