Non-FictionStudent's ShortcutDID

Difference in Differences Excel eBook

Calculate difference-in-differences estimates usin

by Breedlove Yong

  • English
  • 157 pages
  • 2026
  • SamEnrico

Calculate difference-in-differences estimates using Excel for policy evaluation questions.

Formats

Free sample

Chapter 1: The Broken Mirror--–- Every manager has done it. You sit in a conference room, the quarterly numbers glowing on the screen. A new policy launched three months ago—a training program, a pricing change, a marketing campaign. The chart shows a clear upward line after the launch. You point to it.

"See?" you say. "It worked." The room nods. Decisions are made. Bonuses are allocated. Careers advance.And almost every time, that conclusion is wrong.Not because you are stupid.

Not because you are dishonest. Because the chart you are looking at is a broken mirror. It reflects something back at you, but that reflection is distorted in ways you cannot see. The "before versus after" comparison—the most intuitive, most common, most dangerous method of evaluating policies—confuses two completely different things: the effect of your policy and the natural passage of time.This chapter dismantles that illusion. It will show you why comparing before and after fails.

Why comparing treated groups to untreated groups fails. And then it will introduce you to the intellectual framework—the counterfactual, the natural experiment, the difference-in-differences design—that actually works. By the end of this chapter, you will never look at a simple before-after chart the same way again.The Conference Room Trap Let us begin with a story. It is 1992. A team of economists at Princeton University is studying one of the most contentious policy questions in America: what happens when you raise the minimum wage?The conventional wisdom, taught in every introductory economics textbook, is simple.

Raise the minimum wage, and employers will hire fewer workers. Supply and demand. Basic economics. The evidence seemed to support this: whenever a state raised its minimum wage, employment in low-wage sectors would dip slightly in the following months.But a researcher named David Card was skeptical. He noticed something strange.

The studies that claimed to find negative employment effects almost always used a simple before-after design. They would measure employment in a state before a minimum wage increase, measure it again after, and attribute any decrease to the policy. Card realized this was like blaming your umbrella for the rain. Maybe employment would have fallen anyway, for entirely different reasons—a recession, a seasonal slowdown, a factory closing miles away.The conference room trap is this: we stare at a line going up or down after a policy change, and our brains automatically draw a causal arrow. Policy happened.

Outcome changed. Therefore policy caused the change. This is not just a cognitive bias; it is a structural flaw in how we process time-based information. Our minds evolved to see patterns and infer agency. A rustle in the grass means a predator.

A change after an action means the action caused the change. That instinct kept our ancestors alive. But it makes us terrible evaluators of public policy and business strategy.Consider a concrete example. You are the head of sales at a mid-sized software company. In January, you launch a new customer relationship management system.

In March, sales increase by 15 percent. You celebrate. The new system works. But what if the entire industry saw a 15 percent increase because the economy improved? Or what if your largest competitor went bankrupt?

Or what if you launched a complementary advertising campaign at the same time? You have no way of knowing because your simple before-after comparison cannot separate the effect of your CRM from everything else that happened in the world.The problem has a formal name in statistics: omitted variable bias. You are omitting all the other factors that changed between before and after. And there are always other factors. The economy does not stand still.

Seasons change. Competitors enter and exit. Consumer preferences evolve. Your before-after comparison attributes all of that change to your policy, even when your policy did nothing at all.The Second Broken Mirror If before-after comparisons are flawed, perhaps the solution is to compare treated units to untreated units at the same point in time. Instead of measuring New Jersey after the minimum wage increase and comparing it to New Jersey before, why not compare New Jersey after the increase to Pennsylvania after the same period?

If New Jersey's employment fell but Pennsylvania's stayed flat, surely that difference is the effect of the policy.This is the second broken mirror. It is more sophisticated than the before-after comparison, but it suffers from a different fatal flaw: selection bias.The problem is that the treated group and the untreated group are rarely, if ever, identical in all relevant respects before the policy begins. They differ in ways that affect the outcome you are measuring. Perhaps New Jersey had a stronger union presence than Pennsylvania before the minimum wage increase. Perhaps its economy was growing faster.

Perhaps its demographics were different. When you simply compare them after the policy, you are measuring not just the effect of the policy but also all these pre-existing differences.Here is a vivid example. Suppose you want to know whether a prestigious university education increases lifetime earnings. You compare people who graduated from Harvard to people who graduated from a state university. You find that Harvard graduates earn 40 percent more.

Does Harvard cause that difference? Almost certainly not—at least not entirely. Students who get into Harvard are different from students who do not, in ways that also predict higher earnings: family wealth, academic ability, persistence, social networks. You are comparing apples to fighter jets.The same problem plagues policy evaluation. Consider a job training program that is voluntary.

The people who choose to enroll are likely more motivated, more desperate, or better connected than those who do not enroll. If you compare their outcomes after the program, any difference might reflect these pre-existing differences rather than the program itself. This is why randomized controlled trials are the gold standard: random assignment ensures, in expectation, that the treatment and control groups are balanced on both observable and unobservable characteristics.But randomization is often impossible. You cannot randomly assign states to raise their minimum wage. You cannot randomly assign cities to host a new sports stadium.

You cannot randomly assign companies to adopt a new HR policy. Policy happens in the real world, not in a laboratory. So you need a method that works with the messy, non-random data you actually have.The Counterfactual: What You Cannot See Every causal question, at its core, is a question about a counterfactual. What would have happened to the treated group if they had not been treated? You observe what happened to them after the policy.

But you will never, ever observe what would have happened without the policy. That universe does not exist. It is a ghost.The entire enterprise of causal inference is about constructing a credible estimate of that ghost. You build a proxy for the counterfactual using data from a control group. But the control group's outcomes are not, by themselves, the counterfactual.

The control group might have been different from the treatment group in systematic ways, as we just saw. So you need to combine the two imperfect comparisons—before versus after, and treated versus untreated—in a way that cancels out their respective biases.This…

This is the end of the free sample. Get the eBook to keep going. Buy now

About this book

Calculate difference-in-differences estimates using Excel for policy evaluation questions.

Details

Author
Breedlove Yong
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Student's Shortcut, DID
Released
2026-05-29
Pages (approx.)
157
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Breedlove Yong

See all

You may also like

See all