Questions tagged [difference-in-difference]

Often abbreviated DID or DD, this is a technique for inferring causality from observational data. It involves comparing measurements before and after a treatment occurs (hence, the growth rate) in both a group that received the treatment, and an otherwise comparable group that did not.

Filter by
Sorted by
Tagged with
1 vote
0 answers
28 views

Is difference-in-differences appropriate when outcome can only change once over multiple periods?

I have data of the following form, concerning voting in a single election in which ballots can be submitted on any one day over the study period: ID Voted CampaignDate CampaignExp 1 0 02-Jan-2019 1 ...
  • 33
0 votes
0 answers
13 views

Difference in differences with multiple treatments

I work with a large unit-day (i,t) panel and want to estimate how the timing of treatment (A) affects the effectiveness of treatment (B), but I can't get my mind around how to do this correctly. What ...
0 votes
1 answer
23 views

What does an xtreg equation look like?

I ran some FE regressions in Stata using xtreg. One “normal” fixed effects model and a second generalized difference-in-differences model. Now, I am wondering how ...
  • 95
0 votes
0 answers
17 views

Estimation of two successive treatments - Differences in Differences

I am trying to estimate the effect of two successives policies on individual subjects. I have a panel data following individuals each 3 years from 2005 : 2005, 2008, 2011, 2014 and 2017. The first ...
  • 1
0 votes
0 answers
8 views

Confusion about the setting of DIfference-in-Differences

It is a very important concept to me. I am wondering if I want to examine whether a country-level laws have more impact on firm in an industry compared to other industries, can I used the Difference-...
0 votes
0 answers
4 views

Clustering fixed effect for difference in difference

I am trying to investigate the impact of a treatment (deep clean and restocking) on sales of individual product lines with an observational analysis similar to difference in difference. The treatment ...
0 votes
0 answers
18 views

Time Varying Difference in Differences Model

If I am looking at the impact of different tariffs in different months on exports, can anyone tell me if this would be the correct difference in differences model? Or would it be
  • 1
2 votes
0 answers
29 views

Does selecting confounder variables for a model with multiple correlation tests risk biasing results (similar to forward selection)?

My team is conducting a counterfactual difference-in-differences (DiD) healthcare analysis to estimate the benefits of home nursing visits compared with a control group. We've "pre-selected" ...
  • 4,686
1 vote
0 answers
11 views

Stata: Difference-in-Difference model with time variant treatment?

I want to measure the effect that a treatment (merger) has on firms (y). Therefore, I have panel-data for 6 years (2010-2015), consisting of about 1,500 firms. There are 100 firms that are somehow ...
  • 95
0 votes
0 answers
12 views

Diff in Diff with fading treatment impact

I am interested in running a diff in diff model to measure the impact of stock count(the treatment) on sales in a number of supermarkets. After a stock take, the inaccuracies in stock take will grow ...
2 votes
1 answer
61 views

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

I'm working on a difference-in-differences (DiD) analysis for a healthcare study measuring # hospitalizations (X) per # eligible months (Y). Simplifying the math a bit - my actuary colleagues like to ...
  • 4,686
0 votes
0 answers
31 views

Repeated cross-sectional difference-in-difference with panel data on each of the 4 DiD-groups (pre/post treated/control)

I am trying to estimate the effect of a university teaching reform on the wage of its graduates. I have panel data from 2003-2017 on all university students in the same country. The university under ...
  • 1
0 votes
0 answers
61 views

How to test for pre-trends in a DiD setting with repeated cross sectional data?

I have a dataset consisting of repated cross sections spaced out every two years (e.g, 2008, 2010, 2012...). I am running a DiD specification to identify the causal effect of treated individuals after ...
  • 5
0 votes
0 answers
28 views

Is "triple differences" and estimating "heterogeneous treatment effects" the same?

I am running a difference-in-differences (DiD) regression with a time and treatment interaction and I have a continuous outcome variable. However, I hypothesize that the DiD estimator can be moderated ...
0 votes
0 answers
19 views

How to understand Difference-in-Differences with PSM to create the control and treatment groups?

Today I read a paper of Brogaard,2017. Another paper of Hai, 2021 replicates this paper is for preference pupose. In this paper, from my understanding, he use the year 2001 as the event year and ...
0 votes
0 answers
10 views

Difference in Difference estimator using PSM and time varying covariates

Which is the most appropriate DID estimator when we are studying the impact of certain policies on firms across different countries where some firms adopted the policy in every country at diiferent ...
  • 11
0 votes
0 answers
23 views

Country , firm and industry fixed effects in DIfference in Difference estimator

Why do we need to include firm, country or industry fixed effects in DIfference in Difference estimator when we match individual units ( companies) using any psm or any other matching technique on ...
  • 11
0 votes
0 answers
14 views

interpretation of coefficients in triple difference-indifferences model

I am running a two time point difference-in-differences model, and I want to know if the effect of the treatment is moderated by some covariate. I know from another post that I can do this by just ...
0 votes
0 answers
10 views

Difference in difference estimator and parallel trend

If our outcome/dependent Variable is some measure of firm performance (e.g ROA,Tobin's q, or RoE), how would parallel trend hold after conditioning on covariates? What is the solution for this? My ...
  • 11
0 votes
0 answers
136 views

Units without pre-treatment observations in unbalanced panel difference-in-differences analysis with staggered treatment

I am using unit-level (‘ID_number’), unbalanced panel data with annual observations to analyze the effect of a policy change ('treatment') on an outcome ('Y') using difference-in-differences. In my ...
0 votes
0 answers
10 views

Diff-in-diff parallel trends with a positive outcome

I am trying to test for parallel trends when using diff-in-diffs, where my outcome variable is nonnegative (basically a percentage -- the share of subjects with some property). I run into a simple-...
  • 11
2 votes
0 answers
17 views

Equation for a DiD/Event Study Combining Several Simple DiD

I am trying to do a Difference in Differences/Dynamic Event Study but my data doens't easily lend itself to a classic staggered treatment DiD nor a simple 2X2 DiD. My dataset has 1-min readings from ...
1 vote
0 answers
66 views

Difference-in-Differences with Repeated Cross-Sections

I have a sample of individuals participating in two survey waves. The sample represents a repeated cross-section because there are different individuals in each survey wave. Between the waves, there ...
  • 11
0 votes
0 answers
25 views

Log linear transformation in diff-in-diff (did_multiplegt)

I have a panel dataset of firms that take a treatment in different time periods and which may also stop being treated, or may not be treated at all. I am using the did_multiplegt in Stata. I want to ...
  • 1
0 votes
0 answers
10 views

Analyze a tax reform with Diff and Diff

I would like to analyze the effect of a tax reform on incomes. It's a change from a progressive income tax to a flat one. More specifically I want to see if there is an increase in income inequalities ...
1 vote
0 answers
24 views

Sample size estimation for difference-indifference design with continuous outcome

I have spent some time looking for a package in R to estimate the required sample size for a difference-in-difference design with continuous outcome. However, I could not find any package. Is there a ...
  • 11
1 vote
0 answers
36 views

Difference in Difference (DiD) estimator in cross country studies

How can we use Difference in Difference (DiD) estimator in cross country studies where we have to interpret results for each country separately? Should this be one model using country dummy and ...
  • 11
0 votes
0 answers
38 views

Restricting sample to ensure parallel trends in difference-in-differences?

I have large N individual-level data for four periods. The outcome of interest is whether a particular annual event was attended (binary) and is observed in all periods. The treatment of interest is ...
  • 33
0 votes
1 answer
357 views

Stata csdid - Callaway and Sant'anna DD estimator

I'm implementing Callaway and Sant'anna's difference-in-difference (DD) estimator for my study using the csdid code in Stata. I get the following output in Stata; however, I'm unsure of how to ...
0 votes
1 answer
92 views

TWFE Event Study Design Under Staggered Adoption

This discussion provides an excellent summary of TWFE event study model. However i have one estimation related question regarding dynamic TWFE model. In STATA we execute the the following code to ...
1 vote
0 answers
79 views

Difference-in-difference robust to heterogeneous treatment effect - extension of an article

I am trying to extend the results of Gendron-Carrier et al. (2022) article published in the American Economic Journal : Applied Economics which is about the effect of subway opening on pollution. I ...
0 votes
0 answers
33 views

Predicting impact of a time event on markets prices

I'm a novice Data Science student, working on a small university project regarding the impact of twitter on cryptocurrencies prices. In particular, I'm examining the Elon Musk - Dogecoin case. As part ...
1 vote
0 answers
37 views

Which regression model to chose?

Let's suppose I want to measure the impact of M&A in the hospital sector. I have a dataset containing hundreds of hospitals, a quality indicator and the type of ownership for each over a time ...
  • 95
0 votes
0 answers
9 views

Cross sectional survey - difference in difference campaign evaluation

I asked this question on the econ form (https://economics.stackexchange.com/questions/51805/cross-sectional-survey-difference-in-difference-campaign-evaluation) but I don't know how to cross post. I ...
0 votes
0 answers
73 views

Multiple treatment timings and intensities Difference-in-Difference model

I have a question regarding the Difference-in-Difference model. My data consists of three groups: control, intensity 1 and intensity 2. Both treatment groups have two moments of treatment, essentially ...
  • 1
0 votes
0 answers
21 views

Time for control variables in Diff in Diff

I have a question about generating control variables in DID analysis. Let's say I am interested in examining the effect of policy change (2015 reform). So I use the year 2014 and 2016 for the DID ...
0 votes
1 answer
38 views

DiD with 3 treatment states

I was wondering how I would adjust my model where there would be 3 treatment states. There is the untreated but the treated is split into longer treated or less treated. What I mean by this is that ...
0 votes
0 answers
44 views

Difference in difference for a conditional outcome variable

Suppose I want to study the impact of a policy on two outcome variables using the Difference in Difference (DID) method. The first outcome is the decision of whether to produce content in an online ...
  • 423
1 vote
0 answers
36 views

Standard error for a difference-in-difference estimate

I am trying to calculate a difference-in-difference estimate. I have a binary outcome variable, and have estimated risk differences for my intervention and control groups. If we take an example where: ...
  • 477
0 votes
0 answers
26 views

Equivalence test for difference-in-differences regression

The results of my difference-in-differences estimator are insignificant and I was told than an equivalence test could help me to claim that the results are actually null. Even though I got the main ...
2 votes
1 answer
40 views

Generalized difference-in-differences without unit specific effects

Can I get some help in answering the following task? I figured it is generalized difference-in-differences (DiD) (the task is called "RCT and DiD"), but I don't know how to circumvent the ...
1 vote
0 answers
20 views

Binary Variable Measurement Error in Diff-in-Diffs

I have a Difference in Differences (DiD) model with a special kind of measurement error. The true $2\times2$ DiD model is given by: $$ y_{it} = \beta_0 T_i + \beta_1 P_t + \delta P_t \times T_i + x^*_{...
1 vote
1 answer
91 views

Variations of difference-in-difference method

I have data from a group of patients and for each patient I have two time series A and B (continuous quantity) sampled on a weekly basis. My hypothesis is that quantity B has a 1-week lagged effect on ...
1 vote
0 answers
24 views

Common Trend Assumption in Difference-in-differences

I'm running a DiD analysis on whether the introduction of a spinoff NFT (non-fungible token) collection affects the prices of the parent NFT collection. First thing that I did is to visually test ...
2 votes
1 answer
314 views

Adding Controls to Staggered Difference in Difference Regressions on Stata

I am running a staggered diff-in-diff model, looking at legalization's effect on various variables. For context, only a percentage of all states have legalized, and the year they legalized differs ...
1 vote
1 answer
160 views

Long-term event study vs. difference-in-differences (DID) analysis

I am trying to understand the differences between event studies and DiD analysis. In particular, if I want to estimate the specific effect of an event like certification adoption, CEO appointment, or ...
  • 11
0 votes
0 answers
15 views

Simplified DID: How to run significance test

If we know that Variable C = Variable A - Variable B, and Variable A is the difference in two groups (binary data) during time period X. It is statistically significant. Variable B is the difference ...
0 votes
0 answers
12 views

DiD for multiple times and states

I am currently looking at this paper: https://www.nature.com/articles/s41591-021-01487-3 The equation for (1) includes a variable for a baseline value. This is using a regular OLS. I am interested in ...
0 votes
0 answers
47 views

Difference in difference with multiple treatments

I have a setting in which there are three disjoint groups as follows; (1) a group which does not experience any change, i.e., controls, (2) a group who receives treatment 1, and (3) and a group who ...
1 vote
1 answer
183 views

Difference-in-differences if the control group is treated later

Would a difference-in-differences analysis still tell me something important if the control group was treated later in time? Or, would I be better off only restricting my analysis to the time frame up ...
  • 33

1
2 3 4 5
14