kernel_weights: Compute kernel weights from distances

View source: R/kernel_weights.R

kernel_weightsR Documentation

Compute kernel weights from distances

Description

Compute kernel weights from distances

Usage

kernel_weights(distances, bandwidth, kernel = "bisquare")

Arguments

distances

Numeric vector of distances.

bandwidth

Positive numeric bandwidth.

kernel

Kernel type: "bisquare", "gaussian", or "tricube".

Value

A numeric vector with the same length as distances. Each element is the spatial kernel weight assigned to the corresponding observation, with larger weights generally assigned to observations closer to the focal location.

Examples

distances <- c(0, 1, 2, 3)

kernel_weights(
  distances = distances,
  bandwidth = 3,
  kernel = "bisquare"
)

gwrf documentation built on Aug. 24, 2026, 5:15 p.m.