KernelWeight-constructor: Create an instance of the 'KernelWeight' class.

KernelWeight-constructorR Documentation

Create an instance of the KernelWeight class.

Description

Create an instance of the KernelWeight class.

Usage

kernelWeight(
  W = W0,
  N = 1,
  bw = 0.1 * N^(-1/5),
  descr = paste("bw=", round(bw, 3), ", N=", N, sep = "")
)

Arguments

W

A kernel function

N

Fourier basis; number of grid points in [0,2\pi) for which the weights will be computed.

bw

bandwidth; if a vector, then a list of weights is returned

descr

a description to be used in some plots

Value

Returns an instance of KernelWeight.

See Also

kernels

Examples

wgt1 <- kernelWeight(W=W0, N=16, bw=c(0.1,0.3,0.7))
print(wgt1)
wgt2 <- kernelWeight(W=W1, N=2^8, bw=0.1)
plot(wgt2, main="Weights determined from Epanechnikov kernel")

quantspec documentation built on Sept. 11, 2024, 9:15 p.m.