Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Estimates sharp and fuzzy regression discontinuity designs with bandwidth selection, local polynomial fits, and density and validity tests.
86% 95%+9 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
3 of 3 safety checks passed
Not used yet
This skill covers sharp and fuzzy RDD: identification assumptions, bandwidth selection, local polynomial estimation, validity tests, and reporting standards for academic papers.
RDD exploits a known threshold in a continuous "running variable" (X) that determines treatment assignment. Units just above and below the cutoff (c) are comparable on all dimensions except treatment.
Sharp RDD: Treatment perfectly determined by crossing cutoff
Fuzzy RDD: Crossing cutoff increases probability of treatment (like an instrument)
Always plot the raw data with binned means before any regression.
# Python
import matplotlib.pyplot as plt
import numpy as np
# Bin the running variable
df['bin'] = pd.cut(df['running_var'], bins=50)
bin_means = df.groupby('bin')[['running_var', 'y']].mean().reset_index()
plt.figure(figsize=(10, 6))
plt.scatter(bin_means['running_var'], bin_means['y'], s=30, color='steelblue')
Next to this one in the catalogue, plus more from the same author.