Learn R Programming

patterncausality (version 0.1.3)

pcLightweight: Pattern Causality Lightweight Function

Description

This function implements the Pattern Causality Model Mk. II for lightweight analysis of causal interactions between two time series using pattern and signature spaces. It assesses causality through reconstructed state spaces and hashed pattern analysis.

Usage

pcLightweight(X, Y, E, tau, metric, h, weighted, tpb = TRUE)

Value

A data frame with columns for total, positive, negative, and dark causality percentages across evaluated time points, giving insights into the nature of causality between the time series.

Arguments

X

A numeric vector representing the first time series.

Y

A numeric vector representing the second time series.

E

The embedding dimension, which influences the number of dimensions in which the time series is reconstructed for analysis.

tau

The time delay used in reconstructing the time series in the embedded space.

metric

A character string indicating the distance metric to be used (e.g., 'euclidean', 'maximum').

h

The prediction horizon, representing the number of steps ahead for which predictions are needed.

weighted

A logical indicating whether to use a weighted approach in the causality strength calculations.

tpb

A bool parameter to show progress bar.

Examples

Run this code
data(climate_indices)
X <- climate_indices$AO
Y <- climate_indices$AAO
result <- pcLightweight(X, Y, E = 3, tau = 1, metric = "euclidean", h = 2, weighted = TRUE)
print(result)

Run the code above in your browser using DataLab