Passing a pre-trends test is weak evidence: which difference-in-differences assumption fails worst, measuredPrejsť testom pre-trendov je slabý dôkaz: ktorý predpoklad difference-in-differences zlyháva najhoršie, namerané
A difference-in-differences pre-trends test catches only about one-third of the violations that ruin your estimate. Measured, with the simulation and the falsifier.Test pre-trendov v difference-in-differences zachytí len asi tretinu porušení, ktoré zničia tvoj odhad. Odmerané, so simuláciou aj falzifikátorom.
Difference-in-differences (DiD) is one of the most widely used causal designs in economics, policy evaluation, and product analytics. It rests on the parallel-trends assumption: absent the treatment, the treated and control groups would have moved in parallel. The standard reassurance is a pre-trends test — confirm the groups moved together before treatment. We ran a controlled simulation to ask two questions: which violations of DiD's assumptions bias the estimate most, and does the pre-trends test actually catch them?
Method. We simulated 2,000 datasets per condition — one treated unit, 20 controls, six pre-treatment and four post-treatment periods, a true treatment effect of 2.0 — and injected each assumption violation (a parallel-trends drift, anticipation, and a composition shift) at two magnitudes. For each, we measured the resulting bias in the DiD estimate and how often a standard pre-trends test at the 5% level flagged the violation.
What we found.
- Parallel-trends violations are by far the most damaging per unit of violation. A gentle, easily-overlooked drift — a slope of 0.3 per period — already inflated the estimate by 76% of the true effect. This is the assumption to fear most.
- The pre-trends test is underpowered exactly where it matters. Against that 76%-bias violation it fired only 31% of the time — meaning roughly two of every three seriously-biased studies sail through the standard check. Detection became reliable (70%) only once the violation was gross enough to inflate the estimate by 150%.
- Short panels make the test both weak and slightly oversized. With six pre-periods the false-positive rate sat near 12% — above the nominal 5% — so the test misleads in both directions.
- Anticipation and composition violations were less catastrophic here (≤50% bias), with detection roughly tracking magnitude.
The practical rule: never treat a non-significant pre-trends test as the all-clear. With few pre-periods, its power against a study-ruining violation is about one in three. Prefer longer pre-treatment windows, sensitivity bounds (such as honest DiD), or a design that does not lean on parallel trends at all.
What would change our mind: a pre-trends test — or a modern alternative — that achieves high power at six or fewer pre-periods against a slope-0.3 violation would overturn the "weak clearance" conclusion.
(All figures from simulation.)
Difference-in-differences (DiD) je jeden z najpoužívanejších kauzálnych návrhov v ekonómii, hodnotení politík a produktovej analytike. Stojí na predpoklade paralelných trendov: bez zásahu by sa liečená a kontrolná skupina pohybovali paralelne. Štandardné uistenie je test pre-trendov — potvrď, že sa skupiny pred zásahom pohybovali spolu. Spustili sme riadenú simuláciu, aby sme položili dve otázky: ktoré porušenia predpokladov DiD skresľujú odhad najviac, a zachytí ich test pre-trendov naozaj?
Metóda. Simulovali sme 2 000 dátových súborov na podmienku — jedna liečená jednotka, 20 kontrol, šesť období pred zásahom a štyri po, skutočný efekt zásahu 2,0 — a vstrekli sme každé porušenie predpokladu (drift paralelných trendov, anticipáciu a posun zloženia) v dvoch veľkostiach. Pre každé sme zmerali výsledné skreslenie odhadu DiD a ako často štandardný test pre-trendov na 5 % hladine porušenie označil.
Čo sme zistili.
- Porušenia paralelných trendov sú zďaleka najškodlivejšie na jednotku porušenia. Mierny, ľahko prehliadnuteľný drift — sklon 0,3 za obdobie — už nadhodnotil odhad o 76 % skutočného efektu. Toto je predpoklad, ktorého sa treba báť najviac.
- Test pre-trendov má nedostatočnú silu presne tam, kde na tom záleží. Proti tomu porušeniu so 76 % skreslením sa spustil len v 31 % prípadov — čo znamená, že zhruba dve z každých troch vážne skreslených štúdií prejdú štandardnou kontrolou. Detekcia sa stala spoľahlivou (70 %) až keď bolo porušenie dosť hrubé na nadhodnotenie odhadu o 150 %.
- Krátke panely robia test slabým aj mierne predimenzovaným. Pri šiestich obdobiach pred zásahom bola miera falošných pozitív blízko 12 % — nad nominálnymi 5 % — takže test zavádza v oboch smeroch.
- Porušenia anticipácie a zloženia boli tu menej katastrofické (≤50 % skreslenie), pričom detekcia zhruba sledovala veľkosť.
Praktické pravidlo: nikdy neber nesignifikantný test pre-trendov ako „čistú cestu". Pri málo obdobiach pred zásahom je jeho sila proti porušeniu ničiacemu štúdiu asi jedna ku trom. Uprednostni dlhšie okná pred zásahom, hranice citlivosti (ako honest DiD) alebo návrh, ktorý sa o paralelné trendy neopiera vôbec.
Čo by zmenilo náš názor: test pre-trendov — alebo moderná alternatíva — ktorý dosiahne vysokú silu pri šiestich či menej obdobiach pred zásahom proti porušeniu so sklonom 0,3, by zvrátil záver o „slabom uvoľnení".
(Všetky čísla zo simulácie.)