Predictive asymmetry
#
CausalityTools.CausalityTests.predictive_asymmetry — Function.
predictive_asymmetry(source, target, test::PredictiveAsymmetryTest{T, N}) where {T <: TransferEntropyCausalityTest, N}
Compute the predictive asymmetry from source to target using the provided predictive test p. The test can be a VisitationFrequencyTest, TransferOperatorGridTest or NearestNeighbourMITest and has to be defined for prediction lags symmetrically around zero.
Example
We'll use the nonlinear3d system, which consists of three variables and is unidirectionally coupled x \to y \to z.
# Example data
sys = nonlinear3d()
npts = 300
orbit = trajectory(sys, npts, Ttr = 300);
x, y, z = columns(orbit);
# Test setup
η_max = 10
ηs = [-η_max:-1; 1:η_max]
bin = RectangularBinning(floor(Int, npts^(1/4)))
test = VisitationFrequencyTest(ηs = ηs, binning = bin)
pa_test = PredictiveAsymmetryTest(test)
# Analysis
pas_xy = causality(x, y, pa_test)
pas_yx = causality(y, x, pa_test)
pas_yz = causality(y, z, pa_test)
pas_zy = causality(z, y, pa_test)
[pas_xy pas_yx pas_yz pas_zy]
If the test correctly picked up the correct directionality, then the values of of asymmetries corresponding to the causal interactions (1st and 3rd column) should be mostly positive, and those corresponding to non-causal interactions should be mostly negative.