TransferOperatorGridTest
#
CausalityTools.CausalityTests.TransferOperatorGridTest
— Type.
TransferOperatorGridTest(k::Int = 1, l::Int = 1, m::Int = 1, n::Int = 1,
τ::Int = 1, b = 2, estimator::TransferOperatorGrid = TransferOperatorGrid(),
binning_summary_statistic::Function = StatsBase.mean,
binning::RectangularBinning, ηs)
The parameters for a transfer entropy test using the TransferOperatorGrid
estimator [1].
Mandatory keyword arguments
binning::RectangularBinning
: An instance of aRectangularBinning
that dictates how the delay embedding is discretized.ηs
: The prediction lags (that gos into the T_{f} component of the embedding).
Optional keyword arguments
k::Int
: The dimension of the T_{f} component of the embedding.l::Int
: The dimension of the T_{pp} component of the embedding.m::Int
: The dimension of the S_{pp} component of the embedding.n::Int
: The dimension of the C_{pp} component of the embedding.τ::Int
: The embedding lag. Default isτ = 1
.b
: Base of the logarithm. The default (b = 2
) gives the TE in bits.estimator::TransferOperatorGrid
: ATransferOperatorGrid
estimator instance.binning_summary_statistic::Function
: A summary statistic to summarise the transfer entropy values if multiple binnings are provided.
Estimation of the invariant measure
With a TransferOperatorGridTest
, the first step is to compute an approximation to the transfer operator over the partition elements of a rectangular discretization of an appropriate delay reconstruction of the time series to be analysed. Transfer entropy is then computed from the invariant distribution arising from the transfer operator.
About the delay reconstruction for transfer entropy analysis
Denote the time series for the source process S as S(t), and the time series for the target process T as T(t), and C_i(t) as the time series for any conditional processes C_i that also may influence T. To compute (conditional) TE, we need a generalised embedding [3, 4] incorporating all of these processes.
For convenience, define the state vectors
where the state vectors T_f^{(k)} contain k future values of the target variable, T_{pp}^{(l)} contain l present and past values of the target variable, S_{pp}^{(m)} contain m present and past values of the source variable, C_{pp}^{(n)} contain a total of n present and past values of any conditional variable(s). Combining all variables, we have the generalised embedding
with a total embedding dimension of k + l + m + n. Here, \tau indicates the embedding lag (in the VisitationFrequencyTest
, we set \tau_1 = \tau_2 = \tau_3 = \ldots), and \eta indicates the prediction lag (the lag of the influence the source has on the target).
Hence, in the generalised embedding, only T_f depends on the prediction lag \eta, which is to be determined by the analyst. For transfer entropy analysis, \eta is chosen to be some positive integer, while for predictive asymmetry analysis, symmetric negative and positive \etas are used for computing \mathbb{A}.
In terms of this generalised embedding, transfer entropy from a source variable S to a target variable T with conditioning on variable(s) C is thus defined as
Without conditioning, we have
Low-level estimator
This test uses the TransferOperatorGrid
estimator on the following low-level method under the hood.
In this estimator, the mapping between variables of the generalised embedding and the marginals during transfer entropy computation is controlled using a TEVars
instance. It is highly recommended that you check the documentation for this method, because it describes the transfer entropy estimation procedure in detail.
Notes:
- Use
causality(source, target, params::TransferOperatorGridTest)
for regular transfer entropy analysis. This method uses only thek
,l
,m
and ignoresn
when constructing the delay reconstruction. - Use
causality(source, target, cond, params::TransferOperatorGridTest)
for conditional transfer entropy analysis. This method uses thek
,l
,m
andn
when constructing the delay reconstruction.
Example
# Prediction lags
ηs = 1:10
binning = RectangularBinning(10)
# Use defaults, binning and prediction lags are required.
# Note that `binning` and `ηs` are *mandatory* keyword arguments.
TransferOperatorGridTest(binning = binning, ηs = ηs)
# The other keywords can also be adjusted
TransferOperatorGridTest(k = 1, l = 2, binning = binning, ηs = ηs)
References
- Diego, David, Kristian Agasøster Haaga, and Bjarte Hannisdal. "Transfer entropy computation using the Perron-Frobenius operator." Physical Review E 99.4 (2019): 042212. https://journals.aps.org/pre/abstract/10.1103/PhysRevE.99.042212