cpsd_to_var
Spectral factorisation: calculate VAR parameters from cross-power spectral density
Syntax
[H,SIG,iters] = cpsd_to_var(S,G0,maxiters,numtol)
Arguments
See also Common variable names and data structures.
input
S cross-power spectral density (cpsd) matrix G0 covariance matrix of VAR process (default: calculated automatically from cpsd) maxiters maximum iterations (default: 100) numtol numerical tolerance (default: 1e-10)
output
H VAR transfer function matrix SIG VAR residuals covartiance matrix iters number of iterations performed
Description
Calculates the transfer function H and residuals covariance matrix SIG from the cpsd S and covariance matrix G0 of a VAR process, using Wilson's spectral factorisation algorithm [2]. If G0 is not supplied (default), then G is calculated from S (see cpsd_to_autocov) and G0 set to G(:,:,1). The actual number of iterations performed is returned in iters. If the algorithm fails to converge to numerical tolerance numtol within maxiters iterations, an exception MVGC:XMaxItrs is thrown.
Note: to calculate the VAR coefficients, use the utility function trfun2var.
Adapted from original code with the kind permission of Prof. G. Rangarajan of the Dept. of Mathematics, Indian Institute of Science, Bangalore, India; see [3,4] for applications to Granger-causal analysis.
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] G. T. Wilson, "The factorization of matricial spectral densities", SIAM Journal on Applied Mathematics, 23(4), 1972.
[3] M. Dhamala, G. Rangarajan and M. Ding, "Estimating Granger causality from Fourier and wavelet transforms of time series data", Phys. Rev. Lett. 100, 2008.
[4] M. Dhamala, G. Rangarajan and M. Ding, "Analyzing information flow in brain networks with nonparametric Granger causality", NeuroImage 41, 2008.
See also
cpsd_to_autocov | autocov_to_var | trfun2var
Copyright notice
[(C)] Lionel Barnett and Anil K. Seth, 2012. See file license.txt in root directory for licensing terms.