*! version 1.0.0 Subir Hait 2026

Title

rdstagger_agg -- Aggregate ATT(g,t) estimates from rdstagger

Syntax

rdstagger_agg [, type(string)]

type(string) aggregation type; default dynamic

Description

rdstagger_agg collapses the full ATT(g,t) matrix stored by
rdstagger into interpretable summary estimands. Four aggregation
types are available. All estimates use post-treatment cells only, except
dynamic which includes pre-treatment cells for falsification.

Standard errors for aggregated quantities are computed by the
delta-method approximation: SE(mean) = sqrt(sum(SE_i^2)) / K, where
K is the number of cells averaged. This assumes independence across
cohort-period cells.

Results are stored back in e() alongside the original
rdstagger scalars and matrices, so rdstagger_pretest
and rdstagger_plot remain available after aggregation.

Options

type(string) selects the aggregation scheme:

dynamic Event-study aggregation. Averages ATT(g,t) across
cohorts with the same event time k = t-g. Reports estimates for
k = -(G-2), ..., -1 (pre-treatment) and 0, 1, ..., T-1
(post-treatment). Pre-treatment estimates should be near zero if parallel
trends holds; use rdstagger_pretest for a formal test.

group Cohort aggregation. Reports the average post-treatment
ATT for each treatment cohort g, averaged over all post-treatment
calendar periods.

calendar Calendar-time aggregation. Reports the average ATT
in each calendar period t, averaged over all cohorts treated by period t.

overall Single overall ATT: simple unweighted average of all
post-treatment ATT(g,t) cells.

Saved results

rdstagger_agg saves in e():

Matrices
e(agg) aggregated estimates matrix. Columns: (1) index
(event time, cohort, or period), (2) ATT, (3) SE, (4) CI lower,
(5) CI upper, (6) p-value. For dynamic: column (7) = post indicator.

e(attgt) original ATT(g,t) matrix from rdstagger

Scalars
e(N) observations (preserved from rdstagger)

e(overall_att) overall ATT (type overall only)

e(overall_se) SE of overall ATT (type overall only)

Macros
e(agg_type) aggregation type used

e(cmd) rdstagger

Examples

. rdstagger_sim, n(400) periods(8) cohorts(3) seed(42)

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

Event-study:

. rdstagger_agg, type(dynamic)

. rdstagger_plot

Cohort-level ATT:

. rdstagger_agg, type(group)

Calendar-time ATT:

. rdstagger_agg, type(calendar)

Overall ATT:

. rdstagger_agg, type(overall)

. di "Overall ATT = " e(overall_att)

Also see

rdstagger, rdstagger_pretest, rdstagger_plot