The design applies the kernel to the rank of a pre-shock wave rather than
to its calendar distance, because survey waves are unequally spaced. The
r-th most recent of H waves is evaluated at x = (r - 1)/H (offset by
0.001 so that the most recent wave is strictly inside the support), so the
most recent wave receives the largest weight and no wave receives zero.
Usage
cdd_kernel(kernel = c("triangular", "rectangular", "epanechnikov", "gaussian"))Examples
cdd_kernel("triangular")(c(0, 0.5, 1))
#> [1] 1.0 0.5 0.0