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
  • 47.3k
16 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
12 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.3k
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
  • 38.3k
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.5k
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
  • 36.8k
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

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,557
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
  • 36.8k
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
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.3k
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
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.7k
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
Accepted

Analyzing a counterfactual in observational studies?

In observational studies, when randomization is not an option (everyone is treated), it is necessary to estimate a counterfactual of what would had happened in the absence of treatment. It is 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
  • 141k
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.3k
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
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.3k
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.3k
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,549
4 votes
Accepted

What does "randomly assigned conditional on some observable" mean intuitively?

No, your interpretation is not correct. In a sense it is the opposite of what you say. You might find this other question useful. Imagine you are studying the effect of a drug on the recovery time ...
Carlos Cinelli's user avatar
4 votes

Pre-post comparisons for difference-in-differences

It is difficult to determine which is more rigorous, methodologically speaking. If you have multiple observations post-treatment, you could interact a treatment dummy with with all post-treatment ...
Thomas Bilach's user avatar
4 votes
Accepted

Should I call this a fixed effects or differences in differences model?

Differencing or demeaning your equation will remove the within-unit effects. In fact, in your setting with $T = 2$, your estimates of $\beta_{2}$ should be the same whether you difference, demean, or '...
Thomas Bilach's user avatar
4 votes
Accepted

Fixed effects in differences-in-differences

Here is the canonical DD equation with two groups and two periods: $$ y_{ist} = \gamma T_{s} + \lambda d_{t} + \beta(T_{s} \cdot d_{t}) + \epsilon_{ist}, $$ where, for example, we may observe ...
Thomas Bilach's user avatar
4 votes
Accepted

difference-in-differences with multiple time periods - parallel trend assumption

Both methods are doing something very similar: comparing trends between treatment and control. The first has the advantage of being able to easily test the joint null that all the pre $\delta$s are ...
dimitriy's user avatar
  • 38.3k

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