gccm: geographical convergent cross mapping

gccmR Documentation

geographical convergent cross mapping

Description

geographical convergent cross mapping

Usage

## S4 method for signature 'sf'
gccm(
  data,
  cause,
  effect,
  libsizes,
  E = 3,
  tau = 1,
  k = E + 2,
  theta = 1,
  algorithm = "simplex",
  lib = NULL,
  pred = NULL,
  nb = NULL,
  threads = detectThreads(),
  parallel.level = "low",
  bidirectional = TRUE,
  trend.rm = TRUE,
  progressbar = TRUE
)

## S4 method for signature 'SpatRaster'
gccm(
  data,
  cause,
  effect,
  libsizes,
  E = 3,
  tau = 1,
  k = E + 2,
  theta = 1,
  algorithm = "simplex",
  lib = NULL,
  pred = NULL,
  threads = detectThreads(),
  parallel.level = "low",
  bidirectional = TRUE,
  trend.rm = TRUE,
  progressbar = TRUE
)

Arguments

data

The observation data.

cause

Name of causal variable.

effect

Name of effect variable.

libsizes

A vector of library sizes to use.

E

(optional) Dimensions of the embedding.

tau

(optional) Step of spatial lags.

k

(optional) Number of nearest neighbors to use for prediction.

theta

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

algorithm

(optional) Algorithm used for prediction.

lib

(optional) Libraries indices.

pred

(optional) Predictions indices.

nb

(optional) The neighbours list.

threads

(optional) Number of threads.

parallel.level

(optional) Level of parallelism, low or high.

bidirectional

(optional) whether to identify bidirectional causal associations.

trend.rm

(optional) Whether to remove the linear trend.

progressbar

(optional) whether to print the progress bar.

Value

A list

xmap

cross mapping prediction results

varname

names of causal and effect variable

bidirectional

whether to identify bidirectional causal associations

Examples

columbus = sf::read_sf(system.file("shapes/columbus.gpkg", package="spData"))

g = gccm(columbus,"HOVAL","CRIME",libsizes = seq(5,45,5),E = 6)
g
plot(g, ylimits = c(0,0.85))


spEDM documentation built on April 4, 2025, 2:41 a.m.