View source: R/wt_kern_bivariate.R
wt_kern_bivariate | R Documentation |
wt_kern_bivariate
calculates the appropriate weights for two variables for
Multivariate Frontier Regression Discontinuity Estimation with nonparametric implementation.
Kernel weights are calculated based on the L1 distance of the two variables from the frontiers.
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_bivariate().
wt_kern_bivariate(
X1,
X2,
center1,
center2,
bw,
kernel = "triangular",
t.design = NULL
)
X1 |
The input x1 values for the first vector. This variable represents the axis along which kernel weighting should be performed; the first assignment variable in an MRDD. |
X2 |
The input x2 values for the second vector. |
center1 |
A numeric value specifying the point from which distances should be calculated for the first vector, |
center2 |
A numeric value specifying the point from which distances should be calculated for the second vector, |
bw |
A numeric vector specifying the bandwidths for each of three effects models (complete model, heterogeneous treatment model, and treatment only model) detailed in Wong, Steiner, and Cook (2013). |
kernel |
A string indicating which kernel to use. Options are |
t.design |
A character vector of length 2 specifying the treatment option according to design.
The first entry is for |
wt_bivariate_kern
returns a matrix of weights and distances with length equal to that of the X1
and X2
input.
The first and second weights and distances are calculated with respect to all frontiers of different treatments.
The third weight and distance are calculated with respect to the overall frontier of treatment versus
non-treatment.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.