*! version 1.0.0 Subir Hait 2026

Title

rdstagger -- Staggered Regression Discontinuity with Network Interference

Syntax

rdstagger yvar xvar [if] [in],
cutoff(#)
gvar(varname)
tvar(varname)
idvar(varname)
[options]

Required
cutoff(#) RD cutoff value on the running variable

gvar(varname) cohort variable: period unit i first received treatment;
. for never-treated

tvar(varname) calendar time period variable

idvar(varname) unit identifier

Optional
bw(#) RD bandwidth (required, must be positive)

kernel(string) triangular (default), epanechnikov, or uniform

control(string) nevertreated (default) or notyetreated

covariates(varlist) additional covariates entered linearly

bootstrap use bootstrap standard errors

nboot(#) bootstrap replications; default 499

alpha(#) significance level for CIs; default 0.05

Description

rdstagger estimates ATT(g,t) - the average treatment effect
for the cohort of units first treated in period g, measured at calendar
time t - within a unified framework that combines three
identification strategies:

(1) Regression discontinuity (RD): treatment eligibility is determined
by a running variable crossing a known cutoff. Kernel weights concentrate
the comparison on observations near the cutoff.

(2) Staggered difference-in-differences: units adopt treatment at
heterogeneous times (cohorts), following the framework of Callaway and
Sant'Anna (2021). This avoids the forbidden-comparison problem of
two-way fixed effects estimators under treatment effect heterogeneity.

(3) Network interference: units may receive spillover effects through
a network of neighbors. The command estimates both the direct ATT (on
treated units) and the share of neighbors treated as a spillover proxy
(Manski, 2013).

For each cohort-period cell, rdstagger computes a kernel-weighted
DiD using the pre-treatment period immediately before treatment adoption
as the base period (g-1).

Options

cutoff(#) specifies the RD threshold. Units whose running variable
falls below this value are treatment-eligible by design.

gvar(varname) is the cohort variable. It should equal the first
calendar period in which unit i was treated. Set to missing (.)
for never-treated units. Must not equal 0 or 1 (period indexing should
start at 2 or higher so that base period g-1 exists).

tvar(varname) is the calendar time variable (integer).

idvar(varname) is the panel unit identifier.

bw(#) sets the RD bandwidth. A positive value must be supplied
by the user (e.g. bw(1.5)). Choose a bandwidth that provides
sufficient observations on both sides of the cutoff within each
cohort-period cell. Automatic bandwidth selection via rdrobust
will be available in a future release.

kernel(string) specifies the kernel weighting function.
triangular (default) assigns weight 1-|x-c|/h
to observations within bandwidth h. epanechnikov uses a
quadratic kernel. uniform assigns equal weight to all units
within the bandwidth.

control(string) specifies the comparison group.
nevertreated (default) compares each cohort to units with
gvar = .. notyetreated also includes units whose treatment
cohort is strictly later than the calendar period being evaluated.

covariates(varlist) includes additional regressors in the
outcome model. Covariates enter linearly and are mean-centered within
each cohort-period cell.

bootstrap requests bootstrap standard errors. The bootstrap
resamples units within each cohort-period cell. This is more reliable
than the analytic approximation in small cells but is substantially
slower. For exploration, use nboot(199).

nboot(#) sets the number of bootstrap replications. Default 499.
Ignored unless bootstrap is specified.

alpha(#) sets the significance level for confidence intervals.
Default 0.05 (95% CI).

Remarks

Standard errors. When bootstrap is not specified, standard
errors are computed as a conservative analytic approximation
(pooled standard deviation divided by square root of effective sample
size within the cell). These are suitable for large samples. For
small cohort-period cells or heteroskedastic outcomes, bootstrap
is recommended.

Base period. The base period for cohort g is g-1. Cells
with fewer than five treated or control observations are set to missing.

Aggregation. Use rdstagger_agg to collapse ATT(g,t) into
event-study, cohort-level, calendar-time, or overall summaries.
Use rdstagger_pretest to test pre-treatment parallel trends.
Use rdstagger_plot to produce coefficient plots.

Saved results

rdstagger saves the following in e():

Matrices
e(attgt) ATT(g,t) matrix. Rows = cohort-period cells.
Columns: (1) cohort, (2) period, (3) ATT, (4) SE, (5) CI lower,
(6) CI upper, (7) p-value, (8) N treated, (9) N control,
(10) pre/post indicator (1=post)

Scalars
e(N) total observations used

e(bandwidth) bandwidth applied

e(n_cohorts) number of cohorts

e(n_periods) number of periods

Macros
e(cmd) rdstagger

e(control) control group used

e(kernel) kernel used

e(yvar) outcome variable

e(xvar) running variable

e(gvar) cohort variable

e(tvar) time variable

Examples

Basic workflow with simulated data:

. rdstagger_sim, n(400) periods(8) cohorts(3) direct(0.3) spill(0.1) seed(42)

. rdstagger y x, cutoff(0) gvar(g) tvar(period) idvar(id) bw(1.5)

. rdstagger_pretest, method(both)

. rdstagger_agg, type(dynamic)

. rdstagger_plot

. rdstagger_spillover

With not-yet-treated controls and bootstrap SEs:

. rdstagger y x, cutoff(0) gvar(g) tvar(period) idvar(id)

bw(1.5) control(notyetreated) bootstrap nboot(299)

All aggregation types:

. rdstagger_agg, type(dynamic)

. rdstagger_agg, type(group)

. rdstagger_agg, type(calendar)

. rdstagger_agg, type(overall)

References

Callaway, B., and Sant'Anna, P. H. C. (2021).
Difference-in-differences with multiple time periods.
Journal of Econometrics, 225(2), 200-230.
https://doi.org/10.1016/j.jeconom.2020.12.001

Calonico, S., Cattaneo, M. D., and Titiunik, R. (2014).
Robust nonparametric confidence intervals for regression-discontinuity designs.
Econometrica, 82(6), 2295-2326.
https://doi.org/10.3982/ECTA11757

Manski, C. F. (2013).
Identification of treatment response with social interactions.
The Econometrics Journal, 16(1), S1-S23.
https://doi.org/10.1111/j.1368-423X.2012.00368.x

Imbens, G., and Lemieux, T. (2008).
Regression discontinuity designs: A guide to practice.
Journal of Econometrics, 142(2), 615-635.

Author

Subir Hait

Michigan State University

haitsubi@msu.edu

https://github.com/causalfragility-lab/rdstagger-stata

Please report bugs and suggestions via the GitHub repository above.

Also see

rdstagger_sim -- simulate panel data

rdstagger_agg -- aggregate ATT(g,t)

rdstagger_pretest -- pre-treatment falsification tests

rdstagger_plot -- event-study plot

rdstagger_spillover -- decompose direct vs spillover ATT