Kernel Weight Calculation
wt_kern.Rd
wt_kern
calculates the appropriate kernel weights for a vector.
This is useful when, for instance, one wishes to perform local regression.
It is based on the kernelwts
function in the "rdd" package.
This is an internal function and is typically not directly invoked by the user.
It can be accessed using the triple colon, as in rddapp:::wt_kern().
Arguments
- X
A numeric vector containing the the input
X
values. This variable represents the axis along which kernel weighting should be performed.- center
A numeric value specifying the point from which distances should be calculated.
- bw
A numeric value specifying the bandwidth.
- kernel
A string indicating which kernel to use. Options are
"triangular"
(default and recommended),"rectangular"
,"epanechnikov"
,"quartic"
,"triweight"
,"tricube"
, and"cosine"
.