dirconn.methods.statespace.state_space_gc#
- dirconn.methods.statespace.state_space_gc(coefs: Any, noise_cov: Any, *, conditional: bool = True) ndarray#
Time-domain Granger causality of a VAR model from its state-space form.
values[i, j] = log(Sigma^R_jj / Sigma_jj)whereSigmais the innovation covariance of the full model andSigma^Rthat of the reduced model without channeli(reduced_model()), both implied by the same VAR model.- Parameters:
coefs (array_like, shape (n_lags, n_channels, n_channels)) – VAR coefficients
[lag - 1, target, source]; the model must be stable.noise_cov (array_like, shape (n_channels, n_channels)) – Innovation covariance, positive definite.
conditional (bool) –
True: condition on all other channels (one Riccati equation per source).False: judge every pair on its own; the “full” model of a pair is then its bivariate subprocess, also from the same VAR model (one Riccati equation per pair and per channel).
- Returns:
[source, target]in nats, NaN on the diagonal.- Return type:
ndarray, shape (n_channels, n_channels)