codisp.ks: A Nadaraya-Watson Codispersion Coefficient

View source: R/codisp.R

codisp.ksR Documentation

A Nadaraya-Watson Codispersion Coefficient

Description

Computes a nonparametric version of the codispersion coefficient between two spatial variables using a Nadaraya-Watson estimator.

Usage

  codisp.ks(x, y, coords, lags, kernel = "epanech", bandwidths)

Arguments

x

an n-dimensional vector of data values.

y

an n-dimensional vector of data values.

coords

an n-by-2 matrix containing coordinates of the n data locations in each row.

lags

a 2D vector of spatial lags.

kernel

character string which determines the smoothing kernel. kernel can be: "uniform" - a rectangular box. "epanech" - the Epanechnikov kernel or centred Beta(2,2) density (the default). "gaussian" - the Gaussian density function. "biweight" - quartic or biweight kernel. "triangular" - the triangular distribution.

bandwidths

a 3D vector with the kernel bandwidth smoothing parameters.

Details

The procedure computes the codispersion coefficient for two spatial variables which is based on a Nadaraya-Watson version of the codispersion coefficient through a suitable kernel.

Value

A vector with the semivariogram for each variable, the crossed semivariogram and the codispersion coefficient.

References

Cuevas, F., Porcu, E., Vallejos, R. (2013). Study of spatial relationships between two sets of variables: A nonparametric approach. Journal of Nonparametric Statistics 25, 695-714.

Vallejos, R., Osorio, F., Bevilacqua, M. (2020). Spatial Relationships Between Two Georeferenced Variables: With Applications in R. Springer, Cham.

Examples

# Pinus Radiata dataset
data(radiata)

# defining basal-area and height variables from the Pinus Radiata dataset
x <- radiata$basal
y <- radiata$height

# extracting the coordinates from Pinus Radiata dataset
coords <- radiata[,1:2]

# computing the codispersion coefficient
bwds <- c(174, 247, 187)
cf <- codisp.ks(x, y, coords, lags = c(200,200), kernel = "epanech", bandwidths = bwds)
cf

SpatialPack documentation built on Sept. 29, 2024, 5:06 p.m.