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,
  trend.rm = 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,
  trend.rm = TRUE,
  progressbar = TRUE
)

Arguments

data

The observation data.

cause

Name of causal variable.

effect

Name of effect variable.

E

(optional) Dimensions of the embedding.

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) The neighbours list.

threads

(optional) Number of threads.

bidirectional

(optional) whether to examine bidirectional causality.

trend.rm

(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
# }