Research-design recipes

Pick a design and a field: what the replication code in that cell typically does — sample screens, outliers, missing values, fixed effects, standard errors, estimator commands and the design's validation checks — with real packages to click. Read from the 5,361 replication packages that are in at least one design, of the 8,371 linked to a paper whose models we read (how the site counts); the field is the linked paper's.

Design All fieldsFinanceAccountingEconomicsOther fields
Difference-in-differences
498 packages
reghdfe in 46% of 449
385 cluster; most common readable level: county / city / district 12%, state / province 11%; level not readable from the name in 50%
winsorize / trim: 30% (149)
pre-trend test: 27% (132)
80 packages
reghdfe in 73% of 73
66 cluster; most common readable level: firm 20%, state / province 11%; level not readable from the name in 30%
winsorize / trim: 61% (49)
pre-trend test: 10% (8)
23 packages
reghdfe in 88% of 17
17 cluster; most common readable level: firm 18%, industry 12%; level not readable from the name in 29%
winsorize / trim: 74% (17)
event-time: 4% (1)
393 packages
reghdfe in 39% of 358
301 cluster; most common readable level: county / city / district 15%, state / province 11%; level not readable from the name in 55%
winsorize / trim: 21% (83)
pre-trend test: 31% (123)
2 packages thin
att_gt in 100% of 1
clusters mainly by author-named unit (100% of 1 that cluster)
winsorize / trim: 0% (0)
pre-trend test: 50% (1)
Event study
205 packages
eventstudyinteract in 41% of 116
89 cluster; most common readable level: state / province 15%, county / city / district 9%; level not readable from the name in 52%
winsorize / trim: 33% (68)
abnormal / cumulative abnormal returns: 20% (40)
39 packages
reghdfe in 41% of 22
13 cluster; most common readable level: state / province 23%, bank 8%; level not readable from the name in 38%
winsorize / trim: 64% (25)
abnormal / cumulative abnormal returns: 59% (23)
10 packages
reghdfe in 50% of 6
4 cluster; most common readable level: two-way: firm + time 50%, country 25%
winsorize / trim: 90% (9)
abnormal / cumulative abnormal returns: 40% (4)
156 packages
eventstudyinteract in 47% of 88
72 cluster; most common readable level: state / province 14%, county / city / district 10%; level not readable from the name in 57%
winsorize / trim: 22% (34)
abnormal / cumulative abnormal returns: 8% (13)
—
Instrumental variables
1899 packages
ivreg2 in 36% of 1799
1314 cluster; most common readable level: county / city / district 6%, state / province 6%; level not readable from the name in 58%
winsorize / trim: 24% (448)
first-stage / weak-instrument F reported: 47% (893)
241 packages
ivreghdfe in 54% of 224
169 cluster; most common readable level: firm 9%, county / city / district 9%; level not readable from the name in 38%
winsorize / trim: 47% (113)
first-stage / weak-instrument F reported: 38% (92)
7 packages thin
ivreg2 in 43% of 7
clusters mainly by author-named unit (57% of 7 that cluster)
winsorize / trim: 71% (5)
first-stage / weak-instrument F reported: 43% (3)
1642 packages
ivreg2 in 38% of 1559
1134 cluster; most common readable level: state / province 6%, county / city / district 6%; level not readable from the name in 61%
winsorize / trim: 20% (330)
first-stage / weak-instrument F reported: 48% (794)
9 packages thin
ivreg2 in 33% of 9
clusters mainly by author-named unit (75% of 4 that cluster)
winsorize / trim: 0% (0)
first-stage / weak-instrument F reported: 44% (4)
Regression discontinuity
260 packages
rdrobust in 92% of 190
113 cluster; most common readable level: county / city / district 13%, person 6%; level not readable from the name in 67%
winsorize / trim: 23% (60)
manipulation / density test: 47% (122)
28 packages
rdrobust in 95% of 19
4 cluster; most common readable level: bank 25%, state / province 25%; level not readable from the name in 50%
winsorize / trim: 36% (10)
manipulation / density test: 43% (12)
3 packages thin
rdrobust in 100% of 3
clusters mainly by unspecified id (id, i, group...) (100% of 1 that cluster)
winsorize / trim: 33% (1)
manipulation / density test: 33% (1)
227 packages
rdrobust in 91% of 167
clusters mainly by author-named unit (50% of 107 that cluster)
winsorize / trim: 22% (49)
manipulation / density test: 48% (109)
2 packages thin
rdrobust in 100% of 1
clusters mainly by author-named unit (100% of 1 that cluster)
winsorize / trim: 0% (0)
data-driven bandwidth: 50% (1)
Matching
309 packages
psmatch2 in 54% of 295
58 cluster; most common readable level: firm 14%, county / city / district 5%; level not readable from the name in 50%
winsorize / trim: 36% (110)
balance table / standardised differences: 4% (12)
74 packages
psmatch2 in 53% of 70
11 cluster; most common readable level: firm 18%, industry 18%; level not readable from the name in 27%
winsorize / trim: 61% (45)
balance table / standardised differences: 4% (3)
17 packages
psmatch2 in 88% of 16
4 cluster; most common readable level: firm 50%; level not readable from the name in 50%
winsorize / trim: 76% (13)
211 packages
psmatch2 in 52% of 202
43 cluster; most common readable level: firm 9%, county / city / district 7%; level not readable from the name in 58%
winsorize / trim: 25% (52)
balance table / standardised differences: 4% (9)
7 packages thin
psmatch2 in 43% of 7
winsorize / trim: 0% (0)
Synthetic control
104 packages
synth in 65% of 92
winsorize / trim: 24% (25)
placebo-in-space inference: 6% (6)
6 packages thin
sdid in 75% of 4
winsorize / trim: 33% (2)
synthetic DiD: 50% (3)
1 packages thin
winsorize / trim: 100% (1)
95 packages
synth in 67% of 86
winsorize / trim: 23% (22)
placebo-in-space inference: 6% (6)
2 packages thin
synth in 50% of 2
winsorize / trim: 0% (0)
synthetic DiD: 50% (1)
Panel fixed effects (no quasi-experimental design found)
2634 packages
reghdfe in 56% of 2628
2056 cluster; most common readable level: firm 6%, county / city / district 5%; level not readable from the name in 51%
winsorize / trim: 26% (678)
Oster: 1% (27)
556 packages
reghdfe in 76% of 554
509 cluster; most common readable level: firm 12%, two-way: firm + time 6%; level not readable from the name in 40%
winsorize / trim: 48% (266)
Oster: 0% (2)
86 packages
reghdfe in 71% of 85
76 cluster; most common readable level: firm 22%, two-way: firm + time 8%; level not readable from the name in 37%
winsorize / trim: 76% (65)
1976 packages
reghdfe in 50% of 1973
1460 cluster; most common readable level: county / city / district 5%, state / province 5%; level not readable from the name in 56%
winsorize / trim: 17% (343)
Oster: 1% (25)
16 packages
reghdfe in 38% of 16
11 cluster; most common readable level: country 18%, firm 9%; level not readable from the name in 55%
winsorize / trim: 25% (4)
multiple-testing correction: 6% (1)

A package is in a design when we found the design's identification pattern on a line of code it runs (e.g. a treat × post product or csdid for DiD, rdrobust for RD) or it runs that design's own estimator (for IV, one with an excluded instrument); a package can be in several. "Panel fixed effects" is the rest: packages that absorb fixed effects and show none of the other designs. These counts are the design counts on the methods and outcomes pages too. The command, clustering and fixed effects are read from the models that show the design itself ("of N" = the packages with such a model). "Mainly" is said only of a class more than half of the packages use; a clustering variable whose name does not say its level (fac_id, id, a macro) is counted as not readable, never guessed. Cells with fewer than 10 packages are marked thin; a grey figure rests on fewer than 10 packages.

How a package is put in a design
  • The universe is every replication package our extractors have read (code_model_design) that is linked to a live paper by a confirmed link; the field is the linked paper's.
  • A package is in a design when (a) our extractor found the design's identification pattern on a line of code it runs (not a path, a folder macro, an export or an install line), or (b) it runs a model of the design's own estimator family. An ivreg2 / ivreghdfe call with no (endog = z) group counts for neither: it is OLS with robust or HAC errors, not IV.
  • Panel fixed effects is the rest: a fixed-effects estimation and none of the other designs. A package can be in several designs (not panel FE).
  • A model is an estimation OF the design only when the model itself carries the design's signature; the recipe's estimation choices, the outcomes, the instruments and every example are read from those models.