Computes the weight using a kernel function

kernel_function(time, time_zero, h, type)

Arguments

time

time point

time_zero

grid point

h

bandwidth

type

kernel function