wt_kern_bivariate
calculates the appropriate weights for two variables
for nonparametric implementation of Multivariate Frontier Regression Discontinuity Estimation.
Kernel weights are calculated based on the L1 distance of the two variables from the frontiers.
wt_kern_bivariate(
X1,
X2,
center1,
center2,
bw,
kernel = "triangular",
t.design = NULL
)
The input x1 values for the first vector. This variable represents the axis along which kernel weighting should be performed.
The input x2 values for the second vector. X2
has the same length as X1
.
This variable represents the axis along which kernel weighting should be performed.
The point from which distances should be calculated for the first vector.
The point from which distances should be calculated for the second vector.
A numeric vector specifying the bandwidths for each of three effects models
A string indicating the kernel to use. Options are "triangular"
(the default),
"epanechnikov"
, "quartic"
, "triweight"
, "tricube"
, "gaussian"
,
and "cosine"
.
The treatment option according to design.
The 1st entry is for X1: "g"
means treatment is assigned
if X1 is greater than its cutoff, "geq"
means treatment is assigned
if X1 is greater than or equal to its cutoff, "l"
means treatment is assigned
if X1 is less than its cutoff, "leq"
means treatment is assigned
if X1 is less than or equal to its cutoff.
The 2nd entry is for X2.
Three vectors 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.