sdidlab
Specify, run, store and plot synthetic difference-in-differences models
For my higher education research, I needed synthetic control and synthetic difference-in-differences (SDID) models with a single treated unit, and I needed to compare dozens of specifications without losing track of which result came from which choices. sdidlab is a tool I built around the synthdid estimator.
Features of sdidlab:
- Declarative specifications. A model is described in YAML (outcome, window, donor pool, covariates) and hashes to a stable identifier.
- Stored Runs. Every fit is saved with its full fitted object, placebo draws and provenance, so it can be reloaded and re-plotted without refitting.
- Inference for one treated unit. Provides trimmed placebo inference and RMSPE-ratio p-values instead.
- Diagnostics. Trajectory, donor and time weights, donor influence, placebo distributions, gap paths and event studies, styled after the Stata
sdidpackage. - Codegen. A specification can be turned into a runnable, committed R script.
The live demo runs on the California Proposition 99 data or your own CSV: build a specification, inspect every diagnostic, compare fits, and download the specification as YAML plus an R script that reproduces it. Point estimates, weights and untrimmed placebo standard errors match synthdid exactly, and the test suite enforces it.