empirical_var_to_spwcgc

Calculate sampling distribution for pairwise-conditional frequency-domain MVGCs from generated time series data for a specified VAR model

Syntax

   fE = empirical_var_to_spwcgc(A,SIG,m,N,fres,H0,nsamps,mtrunc,decayfac,regmode,acmaxlags,acdectol)

Arguments

See also Common variable names and data structures.

input

   A          VAR coefficients matrix
   SIG        residuals covariance matrix
   m          number of observations per trial
   N          number of trials (default: 1)
   fres       frequency resolution (default: automatic)
   H0         flag: impose null hypotheses of zero connectivity?
   nsamps     number of bootstrap samples
   mtrunc     number of initial time observations to truncate  (default as for 'var_to_tsdata')
   decayfac   initial transients decay factor (default as for 'var_to_tsdata')
   regmode    regression mode (default as for 'tsdata_to_var')
   acmaxlags  maximum autocovariance lags (default as for 'var_to_autocov')
   acdectol   autocovariance decay tolerance (default as for 'var_to_autocov')

output

   fE         empirical spectral Granger causalities distributions

Description

Returns nsamps samples from the empirical sampling distribution of the pairwise-conditional frequency-domain MVGCs for time series data generated from the VAR model specified by the coefficients matrix A and residuals covariance matrix SIG. The time series comprise N trials of length m, and residuals are iid Gaussian with covariance matrix SIG. If the flag H0 is set then data is generated for the nested null models with zero connectivity; i.e. for each target index i and source index j, A(i,j,k) is set to zero for all lags k. For other parameters see var_to_tsdata, tsdata_to_var and var_to_autocov.

The first dimension of the returned matrix fE indexes samples, the second indexes the target (causee) variable, the third the source (causal) variable and the fourth frequency.

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].

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 ].

See also

empirical_var_to_mvgc | empirical_var_to_pwcgc | empirical_var_to_smvgc | var_to_tsdata | tsdata_to_var | var_to_autocov | autocov_to_spwcgc | sfreqs.