Learn R Programming

spEDM (version 1.5)

gccm: geographical convergent cross mapping

Description

geographical convergent cross mapping

Usage

# S4 method for 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 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 )

Value

A list

xmap

cross mapping prediction results

varname

names of causal and effect variable

bidirectional

whether to identify bidirectional causal associations

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.

Examples

Run this code
columbus = sf::read_sf(system.file("shapes/columbus.gpkg", package="spData"))
# \donttest{
g = gccm(columbus,"HOVAL","CRIME",libsizes = seq(5,45,5),E = 6)
g
plot(g, ylimits = c(0,0.85))
# }

Run the code above in your browser using DataLab