K_fun: Kernel function

Description Usage Arguments Value Examples

View source: R/utility.R

Description

Calculates the values of kernel function given a vector of regressors.

Usage

1
K_fun(x, t, h, kern = c("tri"))

Arguments

x

a vector of regressors.

t

a scalar evaluation point.

h

a positive bandwidth.

kern

a string for kernel name; currently "tri" is supported.

Value

a vector of kernel values with the same dimension as x.

Examples

1
2
x <- seq(-1, 1, length.out = 10)
K_fun(x, 0, 0.5, "tri")

koohyun-kwon/HTEBand documentation built on Dec. 21, 2021, 7:42 a.m.