discrete_optimal: Discrete optimal kernel

View source: R/discrete_optimal.r

discrete_optimalR Documentation

Discrete optimal kernel

Description

Discrete optimal kernel

Usage

discrete_optimal(x, z, h, k)

Arguments

x

the target point at which the density is calculated

z

the vector of observations

h

the bandwidth (or smoothing parameter), which should match the condition (3 / 5) * (1 - 1 / k)) < h < 1

k

the integer (positive) parameter that defined the support of the kernel function

Value

Returns the value of the associated kernel function according to the target x and the bandwidth h.

Examples

discrete_optimal(x = 25, z = 1:50, h = 0.9, k = 20)


kernopt documentation built on April 3, 2025, 9:34 p.m.