Skip to main content
18 votes

How do I test if regression slopes are statistically different?

Assuming you have the original data and not just the summary of the fits, the general solution to this problem is to fit a model with an interaction, i.e. to go back to the data and fit the model $$ Y ...
Ben Bolker's user avatar
17 votes
Accepted

Difference-in-differences with individual level panel data

A nice feature of difference-in-differences (DiD) is actually that you don't need panel data for it. Given that the treatment happens at some sort of level of aggregation (in your case cities), you ...
Andy's user avatar
  • 19.2k
17 votes
Accepted

Panel data diff-in-diff and the pattern of the binary treatment indicator

I will assume you have a thorough grasp of the two group/two period difference-in-differences (DD) design and you now want to extend your intuition of the method to the multi-group/multi-period case. ...
Thomas Bilach's user avatar
10 votes
Accepted

Difference in difference with interaction

A triple difference-in-difference is the correct specification for this problem. I'll present a conceptual explanation and then a mathematical one. Conceptually, the standard (double) difference-in-...
Heisenberg's user avatar
  • 4,600
10 votes

difference in difference vs regression discontinuity

RD is about comparing two groups that are very similar except for the treatment because the treatment depends discontinuously on some cutoff. For example, those with a test score of 1499 don't get to ...
dimitriy's user avatar
  • 35.9k
10 votes
Accepted

Control for time trend in difference-in-differences?

In your setting you already control for aggregate time effects via the inclusion of time dummies ($\text{month}_t$), which are more flexible than a linear time trend. To probe for the robustness of ...
Andy's user avatar
  • 19.2k
9 votes
Accepted

How do I perform a statistical test for a Difference-in-Differences analysis?

The difference in differences is what is called an interaction in statistics (as Dimitriy Masterov has already pointed out). You want to test whether the time effect is different when you intervene ...
Gordon Smyth's user avatar
  • 13.1k
9 votes
Accepted

Is parallel trends assumption necessary in difference-in-differences analysis?

The contrast (i.e., estimand) of interest in diff-in-diff is $\color{red}{E[Y^1_{post}|A=1]} - \color{blue}{E[Y^0_{post}|A=1]}$, which relies on the unobserved quantity $\color{blue}{E[Y^0_{post}|A=1]}...
Noah's user avatar
  • 34.2k
8 votes

Difference in Difference vs repeated measures

Summary In general, the DiD analysis is mathematically identical to the interaction term from the repeated measures analysis. If any of that is confusing, or you'd like more explanation, or you want ...
Reid's user avatar
  • 551
8 votes

The difference between DID and fixed effect model

Let's begin with an understanding of the standard fixed effects estimator before extending our intuition to make sense of how difference-in-differences (DD) estimation may offer any improvements. ...
Thomas Bilach's user avatar
7 votes
Accepted

Dynamic treatment timing in a panel-DiD framework

You construct the policy dummy the way you first describe it, i.e. create a column of zeroes. Then for each firm you replace this with ones if a firm is in the treatment group AND it is in the post-...
Andy's user avatar
  • 19.2k
7 votes
Accepted

When does the weight of DD estimator become negative?

Essentially what happens is that the staggered DID can be interpreted as a weighted average of two-period DIDs. So if a group is treated in multiple periods and another is not it could happen that the ...
Ariel's user avatar
  • 2,487
6 votes
Accepted

Staggered Difference-in-Difference: Multiple Treatments Equation

I reproduced the canonical difference-in-differences (DiD) equation from your question below: $$ y_{it} = \gamma Treat_{i} + \gamma Post_{t} + \delta(Treat_{i} \times Post_{t}) + \epsilon_{it}, $$ ...
Thomas Bilach's user avatar
6 votes

Why is ANCOVA not appropriate for modelling post-intervention outcome, controlling for baseline

This is explained very clearly in Lüdtke and Robitzsch (2020). I'll briefly summarize their arguments below but the paper is clear and easy to read, and I recommend you read it. Essentially, the ...
Noah's user avatar
  • 34.2k
6 votes

What might be the identification challenges with a generalized DiD model where the treatment variable experiences reversals (switches on/off)?

In most difference-in-differences applications, the treatment is permanent. By "permanent" I mean once the treatment 'turns on' (i.e., switches from 0 to 1) it stays on (i.e., no reversals) ...
Thomas Bilach's user avatar
6 votes
Accepted

Is this the correct way to estimate a Difference-in-Differences model in R (multiple periods and states)?

The model includes both state and month fixed effects. The state fixed effects, in particular, adjust for all time-constant factors, including a state's membership to the treatment group. Note that ...
Thomas Bilach's user avatar
5 votes

Propensity Scores Weighted DID

At first glance, both the propensity score matching DID (PSM DID) and the inverse probability weighting (IPW DID) that you want to do are sensible ways to approach this: matching and weighting will ...
dimitriy's user avatar
  • 35.9k
5 votes
Accepted

Difference in Difference with multiple period (pre, during, and post treatment)

Let $t=1,2,3$ and $T=1$ if treated, zero otherwise. $\mathbf{I}$ is the indicator function. The expected value from the specification I suggested in the comments above is $$E[Y \vert X] = \beta_0 + \...
dimitriy's user avatar
  • 35.9k
5 votes
Accepted

Diff-in-Diff with different treatment timings for different countries

What you are attempting to do is sometimes referred to as staggered difference-in-differences. So you have units which receive a treatment at different points in time. Your specification, $$ y_{it} = \...
Andy's user avatar
  • 19.2k
5 votes
Accepted

Diff-in-Diff special type of OLS?

Some (perhaps imperfect) definitions Let's say we have some regression model where $\theta$ denotes a parameter of interest and $(x_i, y_i)$ denotes the $i$th observation: $$ y_i = f(\theta, x_i) + \...
Matthew Gunn's user avatar
  • 22.5k
5 votes

How do I test if regression slopes are statistically different?

If you have two regressions of $Y$ onto $X$, one for group $A$ and another for group $B$, you can test for a difference in regression slopes thus: Positivist null hypothesis: $H_{0}^{+}: \beta_{A} - \...
Alexis's user avatar
  • 30.1k
5 votes
Accepted

Difference-in-differences - what variation is being used?

This I assume is an obvious question, but I usually hear it said that with difference in difference estimators, you don't need to worry about level differences between group. In general, you do not ...
Thomas Bilach's user avatar
5 votes

Difference between measuring rates as $E(X/Y)$ vs. $E(X)/E(Y)$?

Recall that the expectation is linear, so $$ E[a + b X] = a + c E[X] $$ Let's say that $E[X] = 0$, in such a case if we have $Y = cX$, where $c$ is some constant, $E[Y] = E[cX] = c E[X] = c \times 0$, ...
Tim's user avatar
  • 139k
5 votes

CUPED vs. Diff-in-Diff

The comparison is apples to orangutans, but I will take a stab at it. CUPED is a variance reduction technique used in experimental analysis of in-test outcomes. It allows you to detect smaller effects ...
dimitriy's user avatar
  • 35.9k
4 votes

Common trend assumption

For your first point, plotting the average of the outcome for the treatment and control group over time would be the right thing to do in order to see the unconditional evolution of the outcomes in ...
Andy's user avatar
  • 19.2k
4 votes
Accepted

Difference in Differences estimation in a log linear model

The treatment effect in your case is in percent and not in percentage points. To see this, consider the following simple example with two groups and two time periods for before and after the ...
Andy's user avatar
  • 19.2k
4 votes
Accepted

Difference in Difference - Does the control units need to be similiar?

I think the problem is that the "parallel trends" (or parallel paths) assumption here was confused with a "parallel growth" assumption. Two lines are parallel over time when the distance between the ...
Andy's user avatar
  • 19.2k
4 votes

Difference-in-difference model with mediators: Estimating the effect of different elements of a policy

You need to explicitly think about a causal model for $Y$ including the $M^x$. It seems you are assuming the effect of $D$ on $Y$ is a constant $\phi$, so I'll assume constant effects throughout. You ...
Julian Schuessler's user avatar
4 votes

3 related questions about DDD (TD, triple-diff) estimators

You're right. In this 2011 slideshow, equation (4), slide 6, shows the missing term. As you mention it, the interpretation to keep in mind is that a triple difference is a difference between two ...
Roland's user avatar
  • 736
4 votes
Accepted

Difference between an "Ordinary Least Square (OLS) model" and a "Panel Fixed- Effects (FE) model"

It is economists' speech for saying that for $y_{it}$ being the observation for individual $i$ at time $t$ and $x_{it}$ being the regressor vector for individual $i$ at time $t$, they ran two models: \...
Jeremias K's user avatar
  • 1,529

Only top scored, non community-wiki answers of a minimum length are eligible