Skip to contents

intersection cardinality

Usage

# S4 method for class 'sf'
ic(
  data,
  column,
  target,
  lib = NULL,
  pred = NULL,
  E = 2:10,
  tau = 1,
  k = E + 2,
  nb = NULL,
  threads = detectThreads(),
  parallel.level = "low",
  detrend = FALSE
)

# S4 method for class 'SpatRaster'
ic(
  data,
  column,
  target,
  lib = NULL,
  pred = NULL,
  E = 2:10,
  tau = 1,
  k = E + 2,
  threads = detectThreads(),
  parallel.level = "low",
  detrend = FALSE
)

Arguments

data

observation data.

column

name of library variable.

target

name of target variable.

lib

(optional) libraries indices.

pred

(optional) predictions indices.

E

(optional) embedding dimensions.

tau

(optional) step of spatial lags.

k

(optional) number of nearest neighbors used.

nb

(optional) neighbours list.

threads

(optional) number of threads to use.

parallel.level

(optional) level of parallelism, low or high.

detrend

(optional) whether to remove the linear trend.

Value

A list

xmap

cross mapping performance

varname

name of target variable

method

method of cross mapping

tau

step of time lag

References

Tao, P., Wang, Q., Shi, J., Hao, X., Liu, X., Min, B., Zhang, Y., Li, C., Cui, H., Chen, L., 2023. Detecting dynamical causality by intersection cardinal concavity. Fundamental Research.

Examples

columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
ic(columbus,"hoval","crime", E = 7, k = 15:25)
#> The suggested E and k for variable crime is 7 and 18 
# }