View source: R/discretise_border.R
| discretise_border | R Documentation | 
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
)
| cutoff | sf object of the RD cut-off in the form of a line (not preferred, but also boundarypoints are possible) | 
| n | the number of borderpoints to be created | 
| random | whether they are randomly chosen (not desireable in most cases) | 
| range | 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) | 
| ymax | if range = TRUE: y coordinates | 
| ymin | if range = TRUE: y coordinates | 
| xmax | if range = TRUE: x coordinates | 
| xmin | if range = TRUE: x coordinates | 
an sf object with selected (and evenly spaced) borderpoints
borderpoints <- discretise_border(cutoff = cut_off, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.