Learn R Programming

spEDM (version 1.7)

sc.test: spatial causality test

Description

spatial causality test

Usage

# S4 method for sf
sc.test(
  data,
  cause,
  effect,
  k,
  block = 3,
  boot = 399,
  seed = 42,
  base = 2,
  lib = NULL,
  pred = NULL,
  nb = NULL,
  threads = detectThreads(),
  detrend = TRUE,
  normalize = FALSE,
  progressbar = FALSE
)

# S4 method for SpatRaster sc.test( data, cause, effect, k, block = 3, boot = 399, seed = 42, base = 2, lib = NULL, pred = NULL, threads = detectThreads(), detrend = TRUE, normalize = FALSE, progressbar = FALSE )

Value

A list

sc

statistic for spatial causality

varname

names of causal and effect variable

Arguments

data

observation data.

cause

name of causal variable.

effect

name of effect variable.

k

(optional) number of nearest neighbors used in symbolization.

block

(optional) number of blocks used in spatial block bootstrap.

boot

(optional) number of bootstraps to perform.

seed

(optional) random seed.

base

(optional) logarithm base.

lib

(optional) libraries indices.

pred

(optional) predictions indices.

nb

(optional) neighbours list.

threads

(optional) number of threads to use.

detrend

(optional) whether to remove the linear trend.

normalize

(optional) whether to normalize the result.

progressbar

(optional) whether to show the progress bar.

References

Herrera, M., Mur, J., & Ruiz, M. (2016). Detecting causal relationships between spatial processes. Papers in Regional Science, 95(3), 577–595.

Examples

Run this code
columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
sc.test(columbus,"hoval","crime", k = 15)
# }

Run the code above in your browser using DataLab