This repository contains a small, reproducible R setup that generates the simulation results of our paper “Difference Estimation for Regression Discontinuity with Multiple Ordered Thresholds” (Moghani & Badri, 2025). The code compares three estimators for the boundary difference
Theory in brief: the integrated-derivative estimator integrates local slope estimates over the interior; it is asymptotically independent from the boundary estimator and admits a feasible CLT. This permits efficiency gains by inverse-variance combination.
simulate.R— single-file R script that runs the simulations end-to-end (Colab-friendly) using a polynomial DGP.simulate2.R— single-file R script that runs the simulations end-to-end (Colab-friendly) using a cosine DGP.README.md— this file.LICENSE— MIT.
The script is written to work locally or in Google Colab with an R runtime.