Learn R Programming

tEDM (version 1.0)

pcm: partial cross mapping

Description

partial cross mapping

Usage

# S4 method for data.frame
pcm(
  data,
  cause,
  effect,
  conds,
  libsizes = NULL,
  E = 3,
  tau = 0,
  k = E + 1,
  theta = 1,
  algorithm = "simplex",
  lib = NULL,
  pred = NULL,
  threads = length(libsizes),
  parallel.level = "low",
  bidirectional = TRUE,
  cumulate = FALSE,
  progressbar = TRUE
)

Value

A list

pxmap

partial cross mapping results

xmap

cross mapping results

varname

names of causal and effect variable

bidirectional

whether to examine bidirectional causality

Arguments

data

observation data.

cause

name of causal variable.

effect

name of effect variable.

conds

name of conditioning variables.

libsizes

(optional) number of time points used.

E

(optional) embedding dimensions.

tau

(optional) step of time lags.

k

(optional) number of nearest neighbors.

theta

(optional) weighting parameter for distances, useful when algorithm is smap.

algorithm

(optional) prediction algorithm.

lib

(optional) libraries indices.

pred

(optional) predictions indices.

threads

(optional) number of threads to use.

parallel.level

(optional) level of parallelism, low or high.

bidirectional

(optional) whether to examine bidirectional causality.

cumulate

(optional) serial or cumulative computation of partial cross mapping.

progressbar

(optional) whether to show the progress bar.

References

Leng, S., Ma, H., Kurths, J. et al. Partial cross mapping eliminates indirect causal influences. Nat Commun 11, 2632 (2020).

Examples

Run this code
sim = logistic_map(x = 0.4,y = 0.4,z = 0.4,step = 45,
                   beta_xy = 0.5, beta_xz = 0,
                   beta_yx = 0, beta_yz = 0.5,
                   beta_zx = 0, beta_zy = 0)
pcm(sim,"x","z","y",libsizes = seq(5,35,5),E = 10,k = 7,threads = 1)

Run the code above in your browser using DataLab