Discrete triangular kernel
discrete_triang(x, z, h, a)
Returns the value of the associated kernel function according to the target x and the bandwidth h.
# Basic usage of discrete_triang() to compute a Discrete triangular kernel
discrete_triang(x = 25, z = 1:50, h = 10, a = 20)
#> [1] 0.00000000 0.00000000 0.00000000 0.00000000 0.01013280 0.01659798
#> [7] 0.02062695 0.02307282 0.02451486 0.02533755 0.02578975 0.02602797
#> [13] 0.02614746 0.02620407 0.02622915 0.02623939 0.02624319 0.02624444
#> [19] 0.02624479 0.02624487 0.02624488 0.02624488 0.02624488 0.02624488
#> [25] 0.02624488 0.02624488 0.02624488 0.02624488 0.02624488 0.02624487
#> [31] 0.02624479 0.02624444 0.02624319 0.02623939 0.02622915 0.02620407
#> [37] 0.02614746 0.02602797 0.02578975 0.02533755 0.02451486 0.02307282
#> [43] 0.02062695 0.01659798 0.01013280 0.00000000 0.00000000 0.00000000
#> [49] 0.00000000 0.00000000