How can i use mne-connectivity to compute DTF and PDC?

conn = vector_auto_regression(data=epochs.get_data(), times=times, names=ch_names)

and then what should i do to get the “H“ and compute the dtf/pdc

More: is it necessary to confirm the order in the vector_auto_regression(), and how?

Hello,

Looking at the documentation, vector_auto_regression() returns matrices A, one for each VAR model. Computing H could be performed as just taking the inverse of A.

By default the VAR models will have order of 1, which is set using the lags parameter.

There isn’t a built-in function for computing DTF or PDC in MNE-Connectivity, so you would have to write this. Alternatively, you could pass the VAR models to a package like SCoT which has tools for computing DTF and PDC: scot package — SCoT.

If you would rather stick with MNE, there are other methods for computing directed connectivity like Granger causality, dPLI, and PSI.

Hi,

Thank you so much for your detailed reply — it was exactly what I needed.
I followed your suggestion to compute the DTF (by combine the mne and scot), and now the issue is resolved.

Next I will try to use the GC method, maybe it can be transformed to DTF/PDC through some mathematical operations :smiley:

1 Like