16/36
Part 3 of 6 · Parallel trendsLearn and do
Trends can be parallel in logs and not in levels
The scale matters too.
weeks = np.arange(8)
big, small = 100 * 1.05 ** weeks, 50 * 1.05 ** weeks
print("gap each week:", np.round(big - small, 1))
levels, logs = did_two_ways(big, small, 4)
print(f"estimate in levels: {levels:.1f}")
print(f"estimate in logs: {logs:.1f}")
Both groups grow 5% a week, from 100 and from 50, with no effect at all. Which scale shows parallel trends?
Pick one to see what it prints.
Pick an answer above to see the rest