discrete_triang: Discrete triangular kernel

View source: R/discrete_triang.r

discrete_triangR Documentation

Discrete triangular kernel

Description

Discrete triangular kernel

Usage

discrete_triang(x, z, h, a)

Arguments

x

the target point at which the density is calculated

z

the vector of observations

h

the bandwidth (or smoothing parameter)

a

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

# Basic usage of discrete_triang() to compute a Discrete triangular kernel
discrete_triang(x = 25, z = 1:50, h = 10, a = 20)


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