Learn R Programming

infocausality (version 1.0)

surd: synergistic-unique-redundant decomposition of causality

Description

synergistic-unique-redundant decomposition of causality

Usage

# S4 method for data.frame
surd(
  data,
  target,
  agents,
  lag = 1,
  bin = 5,
  max.combs = NULL,
  cores = 1,
  backend = "threading"
)

# S4 method for sf surd( data, target, agents, lag = 1, bin = 5, max.combs = NULL, cores = 1, backend = "threading", nb = NULL )

# S4 method for SpatRaster surd( data, target, agents, lag = 1, bin = 5, max.combs = NULL, cores = 1, backend = "threading" )

Value

A list.

unique

Unique information contributions per variable.

synergistic

Synergistic information components by agent combinations.

redundant

Redundant information shared by agent subsets.

mutual_info

Mutual information measures for each combination.

info_leak

Information leak ratio.

Arguments

data

observation data.

target

name of the target variable.

agents

names of agent variables.

lag

(optional) lag order.

bin

(optional) number of discretization bins.

max.combs

(optional) maximum combination order. If NULL, the standard SURD decomposition is applied.

cores

(optional) number of cores for parallel computation.

backend

(optional) Joblib backend: loky, threading, or multiprocessing.

nb

(optional) neighbours list.

References

Martinez-Sanchez, A., Arranz, G. & Lozano-Duran, A. Decomposing causality into its synergistic, unique, and redundant components. Nat Commun 15, 9296 (2024).

Examples

Run this code
columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
tryCatch(
  surd(columbus, "hoval", c("inc", "crime")),
  error = \(e) message("Skipping Python-dependent example: ", e$message)
)
# }

Run the code above in your browser using DataLab