Skip to contents

geographical cross mapping cardinality

Usage

# S4 method for class 'sf'
gcmc(
  data,
  cause,
  effect,
  E = 3,
  tau = 1,
  k = NULL,
  r = 0,
  lib = NULL,
  pred = NULL,
  nb = NULL,
  threads = detectThreads(),
  bidirectional = TRUE,
  detrend = TRUE,
  progressbar = TRUE
)

# S4 method for class 'SpatRaster'
gcmc(
  data,
  cause,
  effect,
  E = 3,
  tau = 1,
  k = NULL,
  r = 0,
  lib = NULL,
  pred = NULL,
  threads = detectThreads(),
  bidirectional = TRUE,
  detrend = TRUE,
  progressbar = TRUE
)

Arguments

data

observation data.

cause

name of causal variable.

effect

name of effect variable.

E

(optional) embedding dimensions.

tau

(optional) step of spatial lags.

k

(optional) number of nearest neighbors used in intersection.

r

(optional) number of excluded neighbors in intersection.

lib

(optional) libraries indices.

pred

(optional) predictions indices.

nb

(optional) neighbours list.

threads

(optional) number of threads to use.

bidirectional

(optional) whether to examine bidirectional causality.

detrend

(optional) Whether to remove the linear trend.

progressbar

(optional) whether to show the progress bar.

Value

A list

xmap

cross mapping results

varname

names of causal and effect variable

bidirectional

whether to examine bidirectional causality

Examples

columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
g = gcmc(columbus,"hoval","crime",E = 5)
#> 
Computing: [========================================] 100% (done)                         
#> 
Computing: [========================================] 100% (done)                         
g
#>   neighbors hoval->crime crime->hoval
#> 1        17      0.16609    0.2041522
# }