--- title: "Measuring distances from the frontier" author: "Irena Papst" output: rmarkdown::html_vignette header-includes: - \usepackage[fontsize=13pt]{scrextend} vignette: > %\VignetteIndexEntry{Measuring distances from the frontier} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- In order to perform certain statistical analyses associated with the regression discontinuity design (RDD), one must have an appropriate measure of distance from the frontier of the assignment region. For simplicity, let's consider the case of two independent variables, but the metric we derive generalizes to $n$ independent variables. Let $F$ denote the frontier, composed of two thresholds $x = c_1$ and $y = c_2$. Without loss of generality, assume the assignment rule is $x \geq c_1$ and $y \geq c_2$\footnote{The subsequent analysis will still work, even if one or both inequalities are flipped and/or strict.}. Hence, the assignment region, $A$, is where **both** of these rules are satisfied. Then, the frontier can be written in set notation as $F = \{ x = c_1 , y \geq c_2 \} \cup \{ y = c_2, x \geq c_1\}$. All of this fancy notation simply describes the following sketch: ```{r echo=FALSE} knitr::include_graphics("figs/f1_digital.png", dpi=200) ``` The question we want to answer is: what does it mean for a subject to be $\varepsilon > 0$ away from the frontier? In the case where *either* $x \geq c_1$ or $y \geq c_2$, the solution is relatively straightforward. The subject satisfies one of the assignment rules already, and so they only must increase (decrease) the other independent variable by $\varepsilon$ to reach the frontier. For example, if $x \geq c_1$ for a subject, then they should be considered $\varepsilon$ away from the frontier if their $y$ variable is either $\varepsilon$ more or $\varepsilon$ less than the threshold $y=c_2$. Again, a diagram clarifies this description: ```{r echo=FALSE} knitr::include_graphics("figs/f2_digital.png", dpi=200) ``` All the points on the blue dashed line are $\varepsilon$ away from the frontier F. But what happens at the corner of the frontier, where *both* $x < c_1$ and $y < c_2$? ```{r echo=FALSE} knitr::include_graphics("figs/f3_digital.png", dpi=200) ``` Here, it helps if we focus on our problem specification. First, recall that $x$ and $y$ are independent of each other. This means that a change in one of these variables does not provoke a change in the other. For a subject, this translates to only being able to move in horizontal and vertical motions in this space of attributes, not diagonally. Thus, what we really mean when we say a subject is $\varepsilon$ away from the frontier, is that adding their horizontal and vertical distance from the frontier gives $\varepsilon$. We also implicitly took the *minimum* distance to the frontier in the above cases; although we could calculate the distance between a point and *any* point on the frontier, we took the *closest* frontier point. Using these two ideas, we can now derive the points that are $\varepsilon$ from the frontier in the case where *both* $x