kernels: Kernel Functions

kernelsR Documentation

Kernel Functions

Description

There are an assortment of (vectorized) kernel functions located in the package.

Truncated Kernel: Kernel where 1, |x|\leq 1 and 0 otherwise. If x=0/0 then the value 1 is given.

Bartlett Kernel: Kernel where max(0,1-|x|), h\neq 0. If x=0/0 then the value 1 is given.

Parzen Kernel: Kernel where 1 - 6 * x^2 + 6 * |x|^3, |x|<=0.5, 2 * (1 - |x|)^3, 0.5<|x|<1, and 0, |x|>1. If x=0/0 then the value 1 is given.

Tukey-Hanning Kernel: Kernel where (1 + cos(\pi x) )/2, |x|<=1 and 0, |x|>1. If x=0/0 then the value 1 is given.

Quadratic Spectral Kernel: Kernel where \frac{25}{12\pi^2x^2} \left(\frac{sin(6\pi x/5)}{6\pi x/5} - cos(6\pi x/5) \right). If x=0/0 then the value 1 is given.

Daniell Kernel: Kernel where sin(pi * x) / (pi * x)*(1 + cos(pi*x)), abs(x)<=1. If x=0/0 then the value 1 is given.

Flat-Top Kernel: Kernel where min(1, max(1.1-|x|,0)),|x|\leq 1. If x=0/0 then the value 1 is given.

Usage

truncated_kernel(x)

bartlett_kernel(x)

parzen_kernel(x)

tukey_hanning_kernel(x)

quadratic_spectral_kernel(x)

daniell_kernel(x)

flat_top_kernel(x)

Arguments

x

Numeric value(s) at which to evaluate kernel. It often indicates current lag divided by window.

Value

Values from given lag(s) in the kernel.

References

Horvath, L., & Rice, G. (2024). Change point analysis for time series (1st ed. 2024.). Springer Nature Switzerland.

L. Horvath, P. Kokoszka, G. Rice (2014) "Testing stationarity of functional time series", Journal of Econometrics, 179(1), 66-82.

Politis, D. N. (2003). Adaptive bandwidth choice. Journal of Nonparametric Statistics, 15(4-5), 517-533.

Politis, D. N. (2011). Higher-order accurate, positive semidefinite estimation of large-sample covariance and spectral density matrices. Econometric Theory, 27(4), 703-744.

Examples

truncated_kernel(-20:20 / 15)
bartlett_kernel(-20:20 / 15)
parzen_kernel(-20:20 / 15)
tukey_hanning_kernel(-20:20 / 15)
quadratic_spectral_kernel(-20:20 / 15)
daniell_kernel(-20:20 / 15)
flat_top_kernel(-20:20 / 15)

fChange documentation built on June 21, 2025, 9:08 a.m.