embedded: embedding spatial cross sectional data

embeddedR Documentation

embedding spatial cross sectional data

Description

embedding spatial cross sectional data

Usage

## S4 method for signature 'sf'
embedded(data, target, E = 3, tau = 1, nb = NULL, detrend = FALSE)

## S4 method for signature 'SpatRaster'
embedded(data, target, E = 3, tau = 1, detrend = FALSE)

Arguments

data

observation data.

target

name of target variable.

E

(optional) embedding dimensions.

tau

(optional) step of spatial lags.

nb

(optional) neighbours list.

detrend

(optional) whether to remove the linear trend.

Value

A matrix

Examples

columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
v = embedded(columbus,"crime")
v[1:5,]

cu = terra::rast(system.file("case/cu.tif", package="spEDM"))
r = embedded(cu,"cu")
r[1:5,]


spEDM documentation built on June 25, 2025, 9:07 a.m.