empirical_var_to_smvgc
Calculate sampling distribution for conditional frequency-domain MVGC from generated time series data for a specified VAR model
Syntax
fE = empirical_var_to_smvgc(A,SIG,m,N,x,y,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) x vector of indices of target (causee) multi-variable y vector of indices of source (causal) multi-variable fres frequency resolution (default: automatic) H0 flag: impose null hypothesis 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 causality distribution
Description
Returns nsamps samples from the empirical sampling distribution of the frequency-domain 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 in 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 model with zero connectivity from Y to X; i.e. A(x,y,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 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_spwcgc | var_to_tsdata | tsdata_to_var | var_to_autocov | autocov_to_smvgc | sfreqs.