1/70
Looks like no tags are added yet.
Difference-in-Differences Main Idea
Compares how much two groups change over time—one receives treatment, and the other doesn't.
Stable level differences
DiD removes existing differences between the groups that stay constant over time.
Common time shocks
DiD accounts for changes that affect both groups equally, such as an improving economy.
Counterfactual trend
How the treatment group's outcome would have changed if it had never received treatment.
What is the parallel trends assumption?
Without treatment, both groups would have experienced the same change over time.
How do you calculate DiD?
Treatment group's change − comparison group's change.
Why does DiD use two differences?
To remove stable group differences and common changes over time.
Do groups need the same starting outcome for parallel trends?
No. Their starting levels can differ; their untreated changes must be the same.
What happens if parallel trends is violated?
The DiD estimate may be biased and may not identify the causal effect.
How do you calculate the comparison group's change?
Comparison after − comparison before.
What is the DiD formula using changes?
(Treated after − treated before) − (Control after − control before).
What does a negative group gap mean?
The first group's outcome is lower than the second group's outcome.
What does a positive DiD estimate mean?
The treated group's outcome increased more, or decreased less, than the comparison group's outcome.
What does the DiD estimate of 20 mean?
The programme is estimated to have increased small firms' monthly sales by 20 units.
What is regression? (Chapter 7 Context)
A statistical method used to estimate how an outcome is related to other variables.A statistical method used to estimate how an outcome is related to other variables.
Simplified explanation
Regression is a way of using an equation to explain or predict an outcome based on different factors.
For example, imagine we're trying to explain a firm's sales.
We might want to know whether its sales depend on:
Whether it's a small or large firm.
Whether we're looking before or after the subsidy.
Whether it's a small firm AND we're looking after the subsidy.
Regression allows us to include all these factors in one equation.
DiD regression equation

What does θ represent? (Chapter 7)
The treated-minus-comparison group difference before treatment.
What does α represent in DiD regression?
The comparison group's average outcome before treatment.
What does γ represent?
The comparison group's change from before to after treatment.
What does β represent?
The additional change for the treated group — the DiD estimate.
What does the error term represent? (uit)
Variation in the outcome not explained by the regression variables.
Why do we leave out the error term when predicting sales?
We calculate the fitted prediction from the estimated coefficients.
Which coefficient measures the DiD effect?
Which coefficient measures the DiD effect?
What does Small = 1 mean?
The firm is a small firm.
What does Post = 1 mean?
The observation is after the subsidy begins.
When does Small × Post equal 1?
When the firm is small AND the observation is after the subsidy.
Threat: Differential trends meaning
treated and comparison groups were already evolving differently.
Anticipation
units change behaviour before formal treatment, contaminating the pre-period
Simultaneous shocks
another policy or event affects the treated group at the same time
Spillovers
treatment changes outcomes for the comparison group
Composition
the types of observations in a group change over time, even if group averages appear comparable
Functional form
parallel trends may hold in levels but not logs, or vice versa
Inference
outcomes within a treated unit or group are correlated over time, requiring appropriate clustering
What are clustered standard errors?
Standard errors that account for correlation among observations within clusters.
What are fixed effects?
Model terms that account for differences associated with particular units or time periods.
What are unit fixed effects?
They account for stable differences between units over time.
What are time fixed effects?
They account for changes shared by all units in a particular period.
What is two-way fixed effects (TWFE)?
A regression model that includes both unit and time fixed effects

What does alpha represent?
The unit fixed effect for firm i.

The time fixed effect for period t.

Whether unit i is receiving treatment at time t.

When the unit is treated during that period.
What does β represent in the Two way fixed effects equation?
The estimated treatment effect.
Why do we include unit fixed effects?
To avoid confusing stable differences between units with treatment effects
Why do we include time fixed effects?
To account for shared changes over time, such as economic shocks
What is staggered treatment timing?
When different units begin receiving treatment in different periods.
What is the Two way fixed equation regression equation?

What are panel data? (Chapter 8)
Data that follow the same units across multiple time periods.
What is a unit?
The person, firm, household, country, or other entity being studied
What are cross-sectional data?
Data collected from different units at one point in time.
What are repeated cross-sectional data?
Data collected at multiple times, but not necessarily from the same units
Which format is commonly used for panel regression?
Long format
Why are panel data useful?
They allow researchers to study changes within the same units over time.
What does t represent?
The time period

The outcome for unit i at time t.
A treatment variable that can vary across units and time.
What does β represent in the simple panel regression?
The estimated association between the treatment variable and the outcome.

A treatment variable that can vary across units and time.
What are unit fixed effects?
They account for stable differences between units over time.
What are time fixed effects?
They account for changes shared by all units in a period.
What is the within transformation?
Subtracting each unit's average from its observations.
Why do we use the within transformation?
To remove time-constant unit characteristics and focus on within-unit changes.
What happens to unit fixed effects after subtracting unit averages?
They disappear because they are constant over time.
What can fixed effects control for?
Stable unit characteristics and, with time FE, shared time shocks.
What is an unbalanced panel?
Some units are missing observations in certain periods.
What is attrition? & What is attrition bias?
Attrition | Units dropping out of a study over time. |
Attrition Bias | Bias that can occur when units leaving a study differ systematically from those remaining. |
What is measurement error?
A difference between a recorded value and the true value.
What is serial correlation?
Observations from the same unit are correlated over time.
Why can serial correlation be a problem?
Ignoring it can lead to incorrect standard errors and significance tests.
What are clustered standard errors?
Standard errors that account for correlation within clusters.