Skip to contents

As GWmodel::gw.weight: with adaptive the bandwidth is the bw-th smallest distance (self included), or bw/n times the largest when bw > n.

Usage

GWRKernelWeights(dists, bw, kernel = "bisquare", adaptive = FALSE)

Arguments

dists

Distances from the location to every data point.

bw

Bandwidth (distance, or neighbour count when adaptive).

kernel

"gaussian", "exponential", "bisquare", "tricube" or "boxcar".

adaptive

Adaptive bandwidth.

Value

Numeric vector of weights.

Examples

GWRKernelWeights(c(0, 1, 2, 3), 2.5)
#> [1] 1.0000 0.7056 0.1296 0.0000