Package 'spEDM'

Title: Spatial Empirical Dynamic Modeling
Description: Analyze causality in geospatial data using empirical dynamic modeling (EDM) through geographical convergent cross mapping (GCCM) by Gao et al. (2023) <doi:10.1038/s41467-023-41619-6> and multispatial convergent cross mapping (multispatialCCM) by Clark et al. (2015) <doi:10.1890/14-1479.1>.
Authors: Wenbo Lv [aut, cre, cph]
Maintainer: Wenbo Lv <[email protected]>
License: GPL-3
Version: 1.3
Built: 2025-01-18 11:22:00 UTC
Source: https://github.com/stscl/spEDM

Help Index


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 + 1,
  nb = NULL,
  trendRM = TRUE,
  progressbar = TRUE
)

## S4 method for signature 'SpatRaster'
gccm(
  data,
  cause,
  effect,
  libsizes,
  E = 3,
  tau = 1,
  k = E + 3,
  RowCol = NULL,
  trendRM = 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) The dimensions of the embedding.

tau

(optional) The step of spatial lags.

k

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

nb

(optional) The neighbours list.

trendRM

(optional) Whether to remove the linear trend.

progressbar

(optional) whether to print the progress bar.

RowCol

(optional) Matrix of selected row and cols numbers.

Value

A list.

xmap

cross-mapping prediction outputs

varname

names of causal and effect variable

Examples

columbus = sf::read_sf(system.file("shapes/columbus.gpkg", package="spData")[1],
                       quiet=TRUE)

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