Learn R Programming

spEDM (version 1.7)

smap: smap forecast

Description

smap forecast

Usage

# S4 method for sf
smap(
  data,
  column,
  target,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  theta = c(0, 1e-04, 3e-04, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 0.5, 0.75, 1, 1.5, 2, 3,
    4, 6, 8),
  nb = NULL,
  threads = detectThreads(),
  detrend = TRUE
)

# S4 method for SpatRaster smap( data, column, target, lib = NULL, pred = NULL, E = 3, tau = 1, k = E + 2, theta = c(0, 1e-04, 3e-04, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 0.5, 0.75, 1, 1.5, 2, 3, 4, 6, 8), threads = detectThreads(), detrend = TRUE )

Value

A list

xmap

forecast performance

varname

name of target variable

method

method of cross mapping

Arguments

data

observation data.

column

name of library variable.

target

name of target variable.

lib

(optional) libraries indices.

pred

(optional) predictions indices.

E

(optional) embedding dimensions.

tau

(optional) step of spatial lags.

k

(optional) number of nearest neighbors used.

theta

(optional) weighting parameter for distances.

nb

(optional) neighbours list.

threads

(optional) number of threads to use.

detrend

(optional) whether to remove the linear trend.

References

Sugihara G. 1994. Nonlinear forecasting for the classification of natural time series. Philosophical Transactions: Physical Sciences and Engineering, 348 (1688):477-495.

Examples

Run this code
columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
smap(columbus,"inc","crime",E = 5,k = 6)
# }

Run the code above in your browser using DataLab