followingRelation {VLTimeCausality} | R Documentation |
followingRelation
Description
followingRelation is a function that infers whether Y
follows X
.
Usage
followingRelation(Y, X, timeLagWindow, lagWindow = 0.2)
Arguments
Y |
is a numerical time series of a follower |
X |
is a numerical time series of a leader |
timeLagWindow |
is a maximum possible time delay in the term of time steps. |
lagWindow |
is a maximum possible time delay in the term of percentage of length(X).
If |
Value
This function returns a list of following relation variables below.
follVal |
is a following-relation value s.t. if |
nX |
is a time series that is rearranged from |
optDelay |
is the optimal time delay inferred by cross-correlation of |
optCor |
is the optimal correlation of |
optIndexVec |
is a time series of optimal warping-path from DTW that is corrected by cross correlation.
It is approximately that |
VLval |
is a percentage of elements in |
ccfout |
is an output object of |
Examples
# Generate simulation data
TS <- SimpleSimulationVLtimeseries()
# Run the function
out<-followingRelation(Y=TS$Y,X=TS$X)