Gist 9bebbdbcb59d4945538e
This example demonstrates how to estimate and visualize neural connectivity using Partial Directed Coherence (PDC) and Direct Transfer Function (DTF) from multivariate autoregressive (MVAR) models. The code simulates MVAR processes, fits model parameters via the Yule-Walker equations, and computes spectral connectivity measures, plotting the resulting frequency-domain relationships between multiple time series. It relies on NumPy, SciPy, Matplotlib, and FFT routines to implement the analysis pipeline, with functions for data generation, order selection via BIC, and spectral density estimation.