← All designs What this design is used to study →

Difference-in-differences

All fields Finance Accounting Economics Other fields
498
packages in this design and field (the same count as the methods and outcomes pages)
449
with a model that shows the design itself (the models the estimation choices below are read from)
2005–2014
median sample years, read as each package page reads its period (352 packages set one in code: 322 a start, 307 an end)

This design across fields

Fieldpackages main clustering (of those that cluster)winsorize / trimchecks
All fields 498 author-named unit 36%; unspecified id (id, i, group...) 12%; county / city / district 12%; state / province 11% (n=385) 30% pre-trend test 27%; event-time 5%
Finance 80 firm 20%; author-named unit 14%; unspecified id (id, i, group...) 12%; state / province 11% (n=66) 61% pre-trend test 10%; event-time 9%
Accounting 23 author-named unit 18%; firm 18%; industry 12%; industry × time 12% (n=17) 74% pre-trend test 0%; event-time 4%
Economics 393 author-named unit 42%; county / city / district 15%; unspecified id (id, i, group...) 13%; state / province 11% (n=301) 21% pre-trend test 31%; event-time 5%
Other fields 2 thin author-named unit 100% (n=1) 0% pre-trend test 50%; event-time 0%

The typical package, and three that differ

Typical = the package that makes the most of this cell's modal choices (reghdfe, clustered by county / city / district, county / city / district + time fixed effects, no winsorizing, drops missing rows) — it matches 6 of 6. Each contrast takes the second most common choice on one dimension.

Typical
The Gift of a Lifetime: The Hospital, Modern Medicine, and Mortality
Alex Hollingsworth; Krzysztof Karbownik; Melissa A. Thomasson; Anthony · American Economic Review 2024 · package 155502 · 51 estimations read
commands
csdid, reghdfe
clusters by
county / city / district
fixed effects
county / city / district + time; county / city / district × author-named unit + author-named unit × time
outliers
no winsorizing / trimming found
missing values
replace missing with zero (imputation); drop rows with missing values; interpolate missing values; replace missing with another value (imputation)
sample years
1922–1940 (as on the package page)
checks
event-time; event-study plot; heterogeneity-robust estimator
Contrast
Opioid Crisis and Real Estate Prices
Cláudia Custódio; Dragana Cvijanović; Moritz Wiedemann · Journal of Financial and Quantitative Analysis 2026 · package 14125 · 5 estimations read
clusters by state / province (modal: county / city / district)
commands
eventstudyinteract, reghdfe
clusters by
state / province
fixed effects
county / city / district + time
outliers
winsorize 2/98
missing values
drop rows with missing values
sample years
2013–… (as on the package page)
checks
heterogeneity-robust estimator
Contrast
The Impact of Legal Abortion on Maternal Mortality
Sherajum Monira Farin; Lauren Hoehn-Velasco; Michael F. Pesko · American Economic Journal: Economic Policy 2024 · package 155089 · 6 estimations read
absorbs state / province + time (modal: county / city / district + time)
commands
eventstudyinteract, reghdfe
clusters by
state / province
fixed effects
state / province + time
outliers
no winsorizing / trimming found
missing values
drop rows with missing values; interpolate missing values; replace missing with another value (imputation); replace missing with zero (imputation)
sample years
1959–1980 (as on the package page)
checks
event-time; heterogeneity-robust estimator
Contrast
Chain Restaurant Calorie Posting Laws, Obesity, and Consumer Welfare
Charles Courtemanche; David Frisvold; David Jimenez-Gomez; Mariétou H · Journal of the European Economic Association 2025 · package 18758 · 141 estimations read
estimates with did_imputation (modal: reghdfe)
commands
did_imputation, areg
clusters by
author-named unit; county / city / district; state / province
fixed effects
county / city / district + time
outliers
no winsorizing / trimming found
missing values
drop rows with missing values; replace missing with zero (imputation)
sample years
2005–… (as on the package page)
checks
heterogeneity-robust estimator

Sample screens

Share of 498 packages in the cell. Greyed: fewer than 10 packages.

Industry screens are read into whole SIC/NAICS sectors (Samples page); CRSP screens are share codes 10/11, exchange codes 1–3 and a price cut of $10 or less in a package that reads CRSP / Compustat / TAQ.

Outliers

149 of 498 packages (30%) winsorize or trim something: 140 winsorize, 21 trim, 28 by group (e.g. by year).

Share of the 149 packages that winsorize or trim (a package can use several cuts). Greyed: fewer than 10 packages.

Missing values

Share of 498 packages in the cell (a package can do several). Greyed: fewer than 10 packages.

Fills count only imputation of a measured variable (R&D set to 0 after a merge), not a dummy being completed.

Standard errors

  • clusters in at least one estimation86% · 385
  • default iid only11% · 48
  • robust only (never clusters)4% · 16

Of the 449 packages with a model that shows the design.

Main clustering level

Share of the 385 packages that cluster: each package counted once, at the level most of its estimations use. Greyed: fewer than 10 packages.

Levels are read from variable names (gvkey, permno → firm; fips, county → county). "Author-named unit" is a name that does not reveal its level (fac_id, route, provider); "unspecified id" is id, i, group — never guessed.

Fixed effects

330 of 449 packages absorb fixed effects in at least one estimation (absorb(), i. dummies, xtreg, fe).

Main fixed-effect set

Share of the 330 packages that absorb fixed effects, each at the set most of its estimations use. Greyed: fewer than 10 packages.

Any estimation absorbs…

Share of 449 packages with a model that shows the design. Greyed: fewer than 10 packages.

Estimator commands

Share of 449 packages with a model that shows the design (a package runs several). Greyed: fewer than 10 packages.

Validation checks

Share of 498 packages in the cell. A check run under a macro or in a file we could not read is missed, so these are lower bounds. Greyed: fewer than 10 packages.

The heterogeneity-robust share is partly circular — those estimators also put a package into this design. Placebo tests are not shown: the detector read 7 of 10 correct.