---
title: RDD in Spatial Fixed Effects Models
url: https://www.emergentmind.com/topics/regression-discontinuity-designs-in-sfm
type: topic
---

# RDD in Spatial Fixed Effects Models

Regression discontinuity designs (RDD) in the context of spatial fixed effects models (SFM) involve identifying and estimating causal treatment effects along a continuous, higher-dimensional assignment boundary. These boundary discontinuity designs—also called multi-score RDDs, with geographic RDD as a notable special case—assign treatment based on a bivariate score, partitioning observed units into control and treatment groups. Spatial clustering and fixed effects are employed to accommodate spatial dependencies and correlated errors within defined clusters.

## 1. Model Specification and Identification

Let $Y_i$ denote the observed outcome, $X_i = (X_{i1}, X_{i2})' \in \mathbb{R}^2$ the bivariate running (score) variable, and $T_i = 1\{g(X_i) \geq 0\}$ the treatment indicator, determined by the known boundary $B = \{x : g(x) = 0\}$. Each unit $i$ is associated with a spatial cluster $s_i$. The SFM is written as:
$$
Y_i = \alpha_{s_i} + \mu_0(X_i) \cdot C_i + \mu_1(X_i) \cdot T_i + \varepsilon_i,
$$
where $\alpha_s$ is the fixed effect for cluster $s$, $C_i = 1 - T_i$, and $\mu_t(x) = \mathbb{E}[Y_i(t)|X_i = x]$. The primary estimand is the boundary-effect (treatment-effect) function:
$$
\tau(b) \equiv \mathbb{E}[Y_i(1) - Y_i(0) | X_i = b], \quad b \in B.
$$
Identification leverages the assumption that for units on either side of $B$, fixed effects $\alpha_s$ are continuous and the conditional means $\mu_0$ and $\mu_1$ are also continuous off the boundary, mirroring the univariate RDD scenario [2505.05670].

## 2. Local Polynomial Estimation Along the Boundary

Estimation proceeds via local polynomial regression applied separately to observations on either side of the assignment boundary, incorporating fixed effects. Let $d(X_i, B)$ denote the Euclidean distance from $X_i$ to its projection on $B$. For a kernel $K:\mathbb{R} \to [0, \infty)$ with bandwidth $h > 0$ ($K_h(u) = K(u/h)/h$), for $t \in \{0,1\}$ solve:
$$
(\hat{\alpha}_t(b), \hat{\beta}_t(b)) = \arg\min_{\alpha \in \mathbb{R},\, \beta \in \mathbb{R}^2,\, \{\gamma_s\}} \sum_{i=1}^n K_h(d(X_i, b)) \cdot 1\{T_i = t\} \cdot [Y_i - \alpha - \beta'(X_i - b) - \gamma_{s_i}]^2.
$$
Cluster fixed effects $\{\gamma_s\}$ are nuisance parameters, typically addressed by within-cluster demeaning prior to regression. The local-linear estimator for the treatment effect at $b$ is then:
$$
\hat{\tau}(b) = \hat{\alpha}_1(b) - \hat{\alpha}_0(b).
$$
Alternatively, regressions can be conducted on cluster-demeaned data without including fixed effects explicitly.

## 3. Univariate Distance vs. Bivariate Location Approaches

There are two principal estimators for $\tau(b)$:

- **Univariate Distance Approach:** Define $D_i(b) = d(X_i, b)\cdot (T_i - C_i) \in \mathbb{R}$ and estimate
  $$
  (\tilde{\alpha}(b), \tilde{\beta}(b)) = \arg\min_{\alpha, \beta \in \mathbb{R}} \sum_{i=1}^n k_h(D_i(b)) [Y_i - \alpha - \beta D_i(b)]^2.
  $$
  Take $\tilde{\tau}(b) = \tilde{\alpha}(b)$. However, when $B$ includes non-smooth regions such as kinks, $\mathbb{E}[Y|D = b]$ is only Lipschitz at zero, which induces a uniform bias of order $O(h)$ for $\tilde{\tau}(b)$, even with high-order polynomials [2505.05670, Lemma 2.2].
- **Bivariate Location Approach:** The estimator $\hat{\tau}(b)$ fits separate two-dimensional polynomials on each side of $B$. Under minimal smoothness and perimeter conditions (Assumption 3.1 and 3.2), the usual nonparametric bias rate $O(h^{p+1})$ holds for $\hat{\tau}(b)$, regardless of boundary irregularity (Theorem 5.1).

Use of the univariate distance estimator is inappropriate when the boundary is irregular, while the bivariate location estimator remains robust in such settings.

## 4. Asymptotic Inference: Variance, Confidence Intervals, and Bands

For $p \geq 1$, define $R(K)=\int K(u)^2du$. Under appropriate design and smoothness conditions with controlled fixed effects, the estimator $\hat{\tau}(b)$ obeys:
$$
\sqrt{nh^2}[\hat{\tau}(b) - \tau(b)] \xrightarrow{d} N(0, V(b)),
$$
where
$$
V(b) = [\sigma_1^2(b) + \sigma_0^2(b)] \cdot R(K) / f_{\text{dist}}(0),
$$
$\sigma_t^2(b) = \operatorname{Var}[Y_i(t)|X_i = b]$, and $f_{\text{dist}}(0)$ is the density at zero of $D_i(b)$. Practical estimation of $f_{\text{dist}}(0)$ utilizes sample proportions within a small neighborhood of the boundary.

A pointwise confidence interval (CI) for $\tau(b)$ is
$$
\hat{\tau}(b) \pm z_{1-\alpha/2} \cdot \sqrt{ \hat{V}(b) / (nh^2) }.
$$
Uniform confidence bands across a grid $b_1,\ldots, b_M \subset B$ use the t-process
$$
T_n(b_\ell) = \frac{ \hat{\tau}(b_\ell) - \tau(b_\ell)}{ \widehat{se}(b_\ell) }, \quad \ell = 1,\ldots, M,
$$
with conditional covariance $\hat{S}_{\ell \ell'}$. Simulating $Z \sim N(0, \hat{S})$, the $1-\alpha$ quantile $c_{1-\alpha}$ of $\max_\ell |Z_\ell|$ determines the uniform band:
$$
\left\{ \hat{\tau}(b_\ell) \pm c_{1-\alpha}\cdot \widehat{se}(b_\ell): \ell = 1, ..., M \right\}
$$
with asymptotic coverage $1-\alpha$ (Theorem 5.3).

Bias correction employs a higher-order ($p+1$) local polynomial estimator for the leading bias term $B(b)$, subtracted from $\hat{\tau}(b)$, with the same bandwidth as the initial fit. Exact implementation aligns with Calonico–Cattaneo–Farrell (2018) [2505.05670].

## 5. Practical Implementation: Kernels, Bandwidths, and Clustering

Implementation details include:

- **Kernels:** Any compact-support, Lipschitz kernel is valid; the triangular kernel is standard for 1D, and product-Epanechnikov for 2D.
- **Bandwidth Selection:** For smooth boundaries, the mean squared error (MSE)-optimal bandwidth rate is $h \sim C \cdot n^{-1/(4+2p)}$. Plug-in and rule-of-thumb selectors are provided in both the paper’s supplemental code and the rd2d package defaults. With boundary kinks, a global rate $h \sim n^{-1/4}$ is recommended to manage the $O(h)$ bias intrinsic to distance-based methods.
- **Standard Errors:** Cluster-robust standard errors are essential when residuals are correlated within clusters.
- **Boundary Irregularities:** For highly jagged boundaries at the analysis scale, Assumption 3.2 (perimeter condition) should be validated, or $h$ locally reduced.

A summary of practical elements is given below:

| Element         | Recommendation           | Notes                                    |
|-----------------|-------------------------|------------------------------------------|
| Kernel          | Triangular, prod.-Epanechnikov | Compact support, Lipschitz               |
| Bandwidth $h$   | Plug-in, rule-of-thumb  | $n^{-1/(4+2p)}$ when $B$ is smooth       |
| SEs             | Cluster-robust          | Correlated errors within clusters        |

## 6. Software and Applied Workflow

The R package `rd2d` implements both distance-based and location-based estimators, supports pointwise and uniform inference, bias correction, bandwidth selection, and cluster-robust inference. The package is available at https://rdpackages.github.io/rd2d and aligns with the estimation framework proposed in [2505.05670]. A typical use proceeds as follows:

```r
library(rd2d)
res2d <- rd2d(Y=Y, X=cbind(X1, X2), Tr=treat,
              kernel="triangular", p=1,
              cluster=cluster, grid=M)
plot(res2d, type="pointwise")  # pointwise CIs
plot(res2d, type="uniform")    # uniform band
```
Control over estimation method (distance vs. location) is achieved via the `method` argument (`"distance"` or `"location"`), and the manual provides further customization details.

## 7. Limitations and Boundary Conditions

The bias properties fundamentally distinguish the two classes of estimators. Distance-based estimators suffer irreducible $O(h)$ misspecification bias under non-smooth boundary geometries, making only the bivariate location approach suitable for empirical analysis in the presence of kinks or irregularities. For extremely irregular boundaries at the scale of analysis or clustering, perimeter and smoothness conditions must be explicitly checked. Observable cluster-level spatial structure is addressed with fixed effects and cluster-robustification; ignoring such structure in presence of correlated errors leads to invalid inference. 

References: Cattaneo, Titiunik and Yu (2025) [2505.05670]; Calonico, Cattaneo and Farrell (2018).

Source: https://www.emergentmind.com/topics/regression-discontinuity-designs-in-sfm