| scm_design | R Documentation |
Selects which units to assign to the treatment arm (and which to the control
arm) in a planned experiment, following Abadie and Zhao (2026). Both sets
of units are chosen by minimising the distance between their weighted-average
predictor vectors and the population-average predictor vector \bar{X},
so the resulting estimates are less susceptible to post-randomisation bias
than pure random assignment.
scm_design(
data,
outcome,
unit,
time,
T0,
T_fit = NULL,
m_min = 1L,
m_max = 1L,
f = NULL,
predictors = NULL,
design = c("base", "weakly_targeted", "unit_level"),
beta = 1,
xi = 1,
alpha = 0.05,
normalize = TRUE,
max_subsets = 100000L
)
data |
Long-format data frame (one row per unit–time). |
outcome |
Name of the outcome column. |
unit |
Name of the unit identifier column. |
time |
Name of the time identifier column. |
T0 |
Last pre-experimental period (a value present in the time
column). Periods after |
T_fit |
Number of fitting periods, counted from the start of
the pre-experimental phase. Defaults to |
m_min |
Minimum number of units assigned to treatment (default 1). |
m_max |
Maximum number of units assigned to treatment (default 1). |
f |
Named numeric vector of population weights |
predictors |
A |
design |
Design formulation: |
beta |
Trade-off parameter |
xi |
Trade-off parameter |
alpha |
Significance level for confidence intervals (default 0.05). |
normalize |
If |
max_subsets |
Maximum number of treatment-set candidates to evaluate before switching to random sampling (default 100 000). |
Three design formulations are available:
"base" (eq. 7): both the synthetic treated and the synthetic control
independently target the population average \bar{X}.
"weakly_targeted" (eq. 9): the treated and control weights jointly
minimise the distance of the synthetic treated to \bar{X} plus
beta times the distance between the synthetic control and the synthetic
treated.
"unit_level" (eq. 10): each treated unit gets its own synthetic
control; the treated weights trade off matching \bar{X} against xi
times each treated unit's own synthetic-control fit, and the aggregate
control weight is the w-weighted combination of the per-unit controls
(eq. 11).
Inference uses "blank periods" — pre-experimental periods whose outcomes were
not used to estimate the weights. Set T_fit strictly smaller than the
number of pre-experimental periods to enable the permutation test and split-
conformal confidence intervals from Section 3 of Abadie and Zhao (2026).
An object of class "scm_design" with components:
treated_units: unit identifiers selected for treatment
control_units: unit identifiers in the control pool
w: J-length weight vector for the synthetic treated unit (sums to 1)
v: J-length weight vector for the synthetic control unit (sums to 1)
tau_hat: estimated treatment effects for each experimental period
p_value: permutation p-value (NA when blank periods are unavailable)
ci_lower, ci_upper: per-period split-conformal confidence interval
Y_synth_tr, Y_synth_co: synthetic treated/control series (all periods)
estimate: ATT (mean of tau_hat)
Abadie, A. and Zhao, J. (2026). "Synthetic Controls for Experimental Design." MIT Working Paper.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.