VLTransferEntropy {VLTimeCausality}R Documentation

VLTransferEntropy

Description

VLTransferEntropy is a Variable-lag Transfer Entropy function. It tests whether X VL-Transfer-Entropy-causes Y.

Usage

VLTransferEntropy(
  Y,
  X,
  maxLag,
  nboot = 0,
  lx = 1,
  ly = 1,
  VLflag = TRUE,
  autoLagflag = TRUE,
  alpha = 0.05
)

Arguments

Y

is a numerical time series of effect

X

is a numerical time series of cause

maxLag

is a maximum possible time delay. The default is 0.2*length(Y).

nboot

is a number of times of bootstrapping for RTransferEntropy::transfer_entropy() function.

lx, ly

are lag parameters of RTransferEntropy::transfer_entropy().

VLflag

is a flag of Transfer Entropy choice: either VLflag=TRUE for VL-Transfer Entropy or VLflag=FALSE for Transfer Entropy.

autoLagflag

is a flag for enabling the automatic lag inference function. The default is true. If it is set to be true, then maxLag is set automatically using cross-correlation. Otherwise, if it is set to be false, then the function takes the maxLag value to infer Granger causality.

alpha

is a significant-level threshold for TE bootstrapping by Dimpfl and Peter (2013).

Value

This function returns of whether X (VL-)Transfer-Entropy-causes Y.

TEratio

is a Transfer Entropy ratio. If it is greater than one , then X causes Y.

res

is an object of output from RTransferEntropy::transfer_entropy()

follOut

is a list of variables from function followingRelation.

XgCsY_trns

The flag is true if X (VL-)Transfer-Entropy-causes Y using Transfer Entropy ratio ratio where TEratio >1 if X causes Y. Additionally, if nboot>1, the flag is true only when pval<=alpha.

pval

It is a p-value for TE bootstrapping by Dimpfl and Peter (2013).

Examples

# Generate simulation data
TS <- SimpleSimulationVLtimeseries()
# Run the function
out<-VLTransferEntropy(Y=TS$Y,X=TS$X)



[Package VLTimeCausality version 0.1.4 Index]