17/36
Part 3 of 6 · Parallel trendsLearn and do
A fake launch date before the real one should find nothing
A second check moves the launch date.
04816 weeks
the fake launch is week 4, and the real launch week 8
before
after
left out
fake before: weeks 0 to 3fake after: weeks 4 to 7left out: weeks 8 to 15
A placebo test runs the same analysis where the true effect is known to be zero. Here it drops the real post weeks, pretends the launch came at week 4, and runs did_estimate on weeks 0 to 7:
for name, extra in [("parallel trends", 0.0), ("treated +0.3 a week", 0.3)]:
y, treated, post, week = panel(3, extra_trend=extra)
est = placebo_estimate(y, treated, week, 4, 8)
print(f"{name + ':':<21} {est:+.2f}")
A fake launch at week 4, on weeks 0 to 7 only. The treated cities trend 0.3 a week faster. What does it find?
Pick one to see what it prints.
Pick an answer above to see the rest