Experimental
Here we list implemented methods that do not yet appear in peer-reviewed journals, but are found, for example, in pre-print servers like arXiv.
The API for these methods, and their return values, may change at any time until they appear as part of the public API. Use them wisely.
Predictive asymmetry
CausalityTools.predictive_asymmetry
— Functionpredictive_asymmetry(estimator::TransferEntropyEstimator, ηs; s, t, [c],
dTf = 1, dT = 1, dS = 1, τT = -1, τS = -1, [dC = 1, τC = -1],
normalize::Bool = false, f::Real = 1.0, base = 2) → Vector{Float64}
Compute the predictive asymmetry (Haaga et al., 2020) 𝔸(s
→ t
) for source time series s
and target time series t
over prediction lags ηs
, using the given estimator
and embedding parameters dTf
, dT
, dS
, τT
, τS
(see also EmbeddingTE
)
If a conditional time series c
is provided, compute 𝔸(s
→ t
| c
). Then, dC
and τC
controls the embedding dimension and embedding lag for the conditional variable.
Returns
Returns a vector containing the predictive asymmetry for each value of ηs
.
Normalization (hypothesis test)
If normalize == true
(the default), then compute the normalized predictive asymmetry 𝒜. In this case, for each $\eta$ in ηs
, compute 𝒜(η) by normalizing 𝔸(η) to some fraction f
of the mean transfer entropy over prediction lags $-\eta, ..., \eta$ (exluding lag 0). Haaga et al. (2020) uses a normalization with f=1.0
as a built-in hypothesis test, avoiding more computationally costly surrogate testing.
Estimators
Any estimator that works for transferentropy
will also work with predictive_asymmetry
. Check the online documentation for compatiable estimators.
Examples
using CausalityTools
# Some example time series
x, y = rand(100), rand(100)
# 𝔸(x → y) over prediction lags 1:5
𝔸reg = predictive_asymmetry(x, y, VisitationFrequency(RectangularBinning(5)), 1:5)
This is a method that does not yet appear in a peer-reviewed scientific journal. Feel free to use, but consider it experimental for now. It will reappear in a 2.X release in new form once published in a peer-reviewed journal.
PATest
CausalityTools.PATest
— TypePATest <: IndependenceTest
PATest(measure::PA, est)
A test for directional (conditional) dependence based on the modified PA
measure, estimated using the given estimator est
. Compatible estimators are listed in the docstring for PA
.
When used with independence
, a PATestResult
summary is returned.
This is an experimental test. It is part of an ongoing paper submission revision, but is provided here for convenience.
CausalityTools.PATestResult
— TypePATestResult(n_vars, ΔA, ttest, pvalue)
Holds the result of a SurrogateTest
. n_vars
is the number of variables used for the test (2 for pairwise, 3 for conditional). ΔA
is the distribution of asymmetries, one for each η
. ttest
is a one-sample t-test, and pvalue
is the right-tailed p-value for the test.