wt_kern: Kernel Weight Calculation

Description Usage Arguments Value

Description

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().

Usage

1
wt_kern(X, center, bw, kernel = "triangular")

Arguments

X

The input x values. This variable represents the axis along which kernel weighting should be performed.

center

The point from which distances should be calculated.

bw

The bandwidth.

kernel

A string indicating the kernel to use. Options are "triangular" (the default), "epanechnikov", "quartic", "triweight", "tricube", "gaussian", and "cosine".

Value

A vector of weights with length equal to that of the X input (one weight per element of X).


rddapp documentation built on May 1, 2019, 8:04 p.m.