Takes in a border in the form of a polyline (or borderpoints) and converts it into point data. These points are later used to run separate non-parametric RD estimations which eventually allows to visualise potential heterogeneous treatment effects alongside the cut-off.
discretise_border(
cutoff,
n = 10,
random = FALSE,
range = FALSE,
ymax = NA,
ymin = NA,
xmax = NA,
xmin = NA
)
sf object of the RD cut-off in the form of a line (not preferred, but also boundarypoints are possible)
the number of borderpoints to be created
whether they are randomly chosen (not desireable in most cases)
default = FALSE, if there is a specific range (N-S or E-W) for which the points are to be drawn (useful in order to exclude sparse borderpoints with little/no oberservations around because the non-parametric RD estimation will fail)
if range = TRUE: y coordinates
if range = TRUE: y coordinates
if range = TRUE: x coordinates
if range = TRUE: x coordinates
an sf object with selected (and evenly spaced) borderpoints
borderpoints <- discretise_border(cutoff = cut_off, n = 10)