Skip to contents

Compute compact tricube kernel weights. Weights are (1 - (d / bw)^3)^3 for d < bw and zero otherwise.

Usage

hgwr_tricube(d, bw)

Arguments

d

Numeric vector or matrix of nonnegative distances.

bw

Positive bandwidth value, or a vector of bandwidths compatible with the columns of d.

Value

Numeric weights with the same shape as d.

Examples

d <- c(0, 0.5, 1, 2)
hgwr_tricube(d, bw = 1)