JuliaDynamics / Associations.jl

Algorithms for quantifying associations, independence testing and causal inference from data.
https://juliadynamics.github.io/Associations.jl/stable/
Other
151 stars 13 forks source link

Allow `LocalPermutationTest` to be used with `TEShannon` estimated using dedicated TE estimators #350

Closed kahaaga closed 1 year ago

kahaaga commented 1 year ago

Fixes

This fixes #348.

The fix here was actually a bit more involved than I thought. Runge's LocalPermutationTest is based on conditional mutual information (CMI), and requires that we estimate that CMI in a certain way (that depends on if entropy-based, mutual information-based or CMI-based estimation is used).

Using any of these estimation methods, we can simply re-write transfer entropy as CMI, construct relevant marginals and apply the LocalPermutationTest directly.

However, dedicated transfer entropy estimators such as Zhu1 or Lindner can't easily be expressed in terms of any of the above-mentioned estimation methods. Therefore, I here introduce a new conditional independence test, specifically aimed for transfer entropy. The concept is similar to what is done for the CMI-based LocalPermutationTest: shuffle one variable according to local neighbor information in the conditioning variable. The shuffled variable for transfer entropy is the first( source) variable, similar to what we do for SurrogateTest.

I don't think this transfer entropy-specific local permutation test appears in the literature anywhere, so it would be fun to explore it further at some point in a paper, but that's for future work.

Misc

TODO: