Learn R Programming

spEDM (version 1.5)

embedded: embedding spatial cross sectional data

Description

embedding spatial cross sectional data

Usage

# S4 method for sf
embedded(data, target, E = 3, tau = 1, nb = NULL, trend.rm = FALSE)

# S4 method for SpatRaster embedded(data, target, E = 3, tau = 1, trend.rm = FALSE)

Value

A matrix

Arguments

data

The observation data.

target

Name of target variable.

E

(optional) Dimensions of the embedding.

tau

(optional) Step of spatial lags.

nb

(optional) The neighbours list.

trend.rm

(optional) Whether to remove the linear trend.

Examples

Run this code
columbus = sf::read_sf(system.file("shapes/columbus.gpkg", package="spData"))
embedded(columbus,target = "CRIME", E = 3)

Run the code above in your browser using DataLab