Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
16 views

Shortfalls of using Machine Learning algorithms to predict counterfactual outcome of the treated

To see the effect of a treatment we would like to know the difference between a person in a world in which she received the treatment and one in which she does not. Since we never observe the ...
0
votes
0answers
17 views

DiD with 2 time periods but multiple entities

How does DiD work for multiple entities but only 2 time periods? Would you still use panel data and which regression would you run? Thank you in advance
0
votes
0answers
24 views

DiD Different Scenarios

I have a few questions about DiD and impact of changing minimum wages on employment. a) Have 2 states, 1 changes min wage and 1 doesnt, and 2 time periods so can easily compute this using a simple ...
0
votes
1answer
28 views

Difference-in-Differences combining 3 periods prior to, during and after treatment

I have Difference-in-Differences models with 3 periods: pre-treatment, treatment and post-treatment periods. Normally, we could do DID in the following way: run DID between pre-treatment and ...
0
votes
1answer
27 views

Can I use a first difference variable as dependent variable in a panel regression even if it contains both positive and negative values?

Can I still use a first difference variable as the outcome variable to run a panel (say, diff-in-diff) regression? For example, my dependent variable is defined as $Y_{i,t} = M_{i,t} - M_{i,t-1} - P_{...
0
votes
2answers
42 views

Placebo Tests: Is it okay to create a placebo treatment group from a random sample of the control group?

I am running a 2 period difference in differences model on a repeated cross section. I want to test the parallel trend assumption using a placebo test. I have read that to do this "you perform an ...
4
votes
1answer
55 views

What does “randomly assigned conditional on some observable” mean intuitively?

From my textbook it say that "If the treatment in a quasi-experiment is "as if" randomly assigned, conditional on some observed variables w, then the treatment effect can be estimated using ...
0
votes
1answer
40 views

Matching on pre-treatment outcome in diff-in-diff

The parallel trends assumption for a difference-in-differences analysis does not require the level of the trends to be similar (just parallel). However, in a case where we want the levels to be ...
0
votes
1answer
32 views

Difference-in-differences using two time series

I hope the group will be able to help on the following. I have the following policy-evaluation problem: stock exchange A reduced their trading costs after period X (say, after 2008), thus managing to ...
0
votes
0answers
37 views

Using difference-in-differences as data preprocessing

I am having difficulties with wrapping my head around an idea. Can difference-in-differences be used to remove bias from the data? I found a mention here: "Difference in differences is a well-accepted ...
0
votes
1answer
24 views

Is it possible to add the standard errors of 2 groups together to obtain the standard error of the 2 groups combined

I am trying to recreate the results in this table. The results have been obtained by difference in difference estimation. I can obtain values from all columns except for column 5 and 6. Column 5 says ...
0
votes
0answers
38 views

Difference-in-differences with unbalanced panel data

I am working on a quasi-experimental study with a large unbalanced panel dataset. There are N=300,000 and T=20, where roughly 50,000 individuals receive treatment since several different periods. I ...
0
votes
0answers
11 views

why did Meyer use difference in difference to estimate the impact of workers compensation on injury duration?

Meyer, Viscusi and Durbin (MVD) measured the impact of increases in workers compensation on the amount of time a person would stay out of work if they were injured. They say in the paper that benefits ...
0
votes
1answer
20 views

Diff-in-diff with mactched control group

I want to run a diff-in-diff model. To choose an appropriate control group, I use a nearest-neighbor matching model based on several determinants of the outcome variable that I study. I was ...
0
votes
0answers
26 views

pospensity score modeling with differences in differences

I want to use a difference in differences specification which groups the data together using propensity scores. To do this is it as simple as obtaining the propensity scores, then taking the ...
1
vote
0answers
26 views

How do I code and analyze more than one set of treatments (e.g., intervention, implementation) within Difference-in-differences analysis?

I am working on a project in which I want to utilized difference-in-differences (DID) analysis to look at the impact of a county-level policy on rates of a social problem at the county level in a ...
3
votes
1answer
56 views

Diff-in-Diff with multiple treatment groups

I have monthly panel data and I want to estimate the effects of two different treatments that occur in different time periods. The treatment groups are not the same. An individual can belong one, both ...
0
votes
0answers
13 views

common trend test-coefficient plot

I'm doing the common trend test for DID, and want to use "coefplot" to make a coefficient plot, but I don't know how to show the last pre-treatment period(coefficient is zero) on the plot, since this ...
3
votes
0answers
58 views

Can I use an instrumental variable to control for treatment endogeneity in differences-in-differences model?

I have panel data with two time periods (pre and post) and two groups (treatment and control). I have a differences-in-differences model with the standard estimating equation: \begin{equation} y_{it} ...
1
vote
1answer
44 views

Diff-in-Diff special type of OLS?

Is difference-in-differences just a special type of OLS? Can I add fixed effects in my diff-in-diff model?
0
votes
0answers
11 views

Validity of DiD estimator on PISA data

I am trying to investigate the effect of the 2007-2009 Financial crisis on education quality measured by the PISA scores. The proposed model to use is Difference-in-Difference with countries hit by ...
0
votes
1answer
34 views

Diff in diff model with multiple treatments in multiple perdiods?

Can I estimate a diff in diff model to compare the effects of two different treatments that apply in different time periods in different countries? I have 30 countries for an average time span of 34 ...
1
vote
0answers
14 views

Difference-in-difference model: using difference year ranges for variables

I am working on a project that involves using the difference-in-difference method and was wondering if will ruin the outcome if I use a different year range for my independent and dependent variables. ...
1
vote
0answers
25 views

Is this a Diff and Diff kind of problem?

I have a sample of 500 firms and I need to study if an observed variable $y_i$ is different before and after a firm-specific event (happens 4 times in a year). I have 6 years of data for each firm. ...
0
votes
0answers
42 views

Difference-in-difference specification using autocorrelation or additional dimension

I am interested in studying the impact of a monetary policy intervention on the supply of credit from banks to firms. For the same, I am interested in using a difference-in-difference estimation ...
0
votes
0answers
18 views

Different ways to do Panel DID?

What is the difference between these two specifications, when performing an analysis on the impact of a policy in a panel data environment? $$y_{it} = \beta_1 (\text{treatgroup}_{i}) + \beta_2 (\text{...
1
vote
1answer
36 views

Unbiasedness and Consistency of DID estimator - pooled cross sections over time

Consider two time periods, where In time-period 1: a random sample is collected for group 1 (control) and a random sample is collected for group 2 (treated). In time-period 2: a random sample is ...
0
votes
2answers
43 views

Zero inflates Negative Binomial difference in difference model

I have data set up in the standard difference in difference format. Each subject has two observations, one for pre and one for post intervention. The outcome variable is total number of ER visits. ...
1
vote
1answer
60 views

Difference-in-difference effect with triple interaction

I added an image of the regression output I could use some help with, as I am trying to recreate this but with data from a different time period. This is the result of a difference-in-difference ...
0
votes
1answer
13 views

MVT/ABn pricing test comparison

I have results for a a 5 variant pricing test: A 0% (control group) B +5% C -5% D +10% E -10% Below are my results (all normalised to give if exactly 20% of traffic goes through the variant, ...
1
vote
0answers
34 views

Difference-in-Difference with multiple regression vs. matching combined with Difference in Difference

I want to use a Difference-in-Difference approach. In order to make sure treatment and control group are similar, I want to use a propensity score matching before the DiD approach. What I do is to ...
0
votes
1answer
417 views

propensity score matching with difference-in-differences for panel data

Research design utilizes companies that switched auditors (TREATMENT) and propensity score matched (PSM) companies that did not change their auditor (CONTROL). To obtain the propensity score for each ...
0
votes
0answers
32 views

Constructing a synthetic treatment group using Synth

Synth is a package for R that enables one to construct a synthetic control group. It constructs a synthetic control group based both on predictors, and on the dependent variable. https://www....
0
votes
0answers
18 views

Solving a contradiction in DiD estimation

I am estimating the effect of a specific public intervention on the amount of accidents occurring in a city, using a difference-in-difference estimator. Exploring the data, I have tried using 9 ...
1
vote
0answers
165 views

Parallel trend assumption in difference-in-differences

I want to run a difference in difference model to evaluate the impact of a policy change using panel data with 30 individuals in the control group and 35 individuals in the treatment group. When ...
3
votes
0answers
183 views

Pro and cons between Bayesian structural time series (BSTS) vs difference-in-differences?

Google's paper markets BSTS's benefits over DID such that "In contrast to classical difference-in-differences schemes, state-space models make it possible to (i) infer the temporal evolution of ...
3
votes
0answers
29 views

Avoiding adjustments for time-varying controls in difference-in-differences (DID)?

In difference-in-differences (DID) analysis, it seems like a "folk theorem" that one should be very wary of adjusting for time-varying controls. The reason, eminently plausible, is that time-varying ...
1
vote
0answers
88 views

Difference in differences model with time-varying continuous treatment

I am trying to estimate a non-standard DID model. There are two time-periods, pre and post treatment. All units are treated in period 2 yet some more intensely than others. Suppose this variance in ...
2
votes
0answers
43 views

Standard error implications when combining IPTW and difference-in-differences

My question is about combining Inverse Probability of Treatment Weighting (IPTW) with a difference-in-difference regression with two periods (pre and post treatment). Basically, I first computed the ...
0
votes
0answers
26 views

Difference-in-Difference (DID) estimation

In my project, I want to examine if job promotion affects people's variety seeking. I am working with panel data. I have some people who have not experienced promotion (control) over the three years ...
1
vote
0answers
27 views

Comparing observed and expected diets of two different species

My data consists of dietary data from two species (C1 and C2) and expected diets for each species (E1, E2) generated from a combination of variables, but is based on their foraging behavior. What I ...
0
votes
1answer
29 views

Pre-treatment period in difference-in-differences model

I want to evaluate the consequences of a policy change using a diff-in-diff setup. I have quarterly data over ten years before the treatment ($t_{-10}$, $t_{-9}$, ..., $t_{-1}$) and ten years after ...
0
votes
0answers
17 views

Composition of groups in difference-in-difference models

Assume a difference-in-difference setup where the control and treatment groups are heterogeneous (different observable characteristics) but The parallel trend assumption is verified in the pre-...
0
votes
1answer
30 views

Interpretation of a dif in dif approach

I am conducting a Difference in Difference Regressionalaysis of a Treatment effect over time. Leaving out the covariates, I have three variables over which I am conducting a multiple linear ...
-1
votes
1answer
33 views

Difference-in-difference estimator: structural break

Consider the following model: $Y_{it} = \alpha + \alpha_1 T_{it} + \alpha_2 Post_{it} + \alpha_3 Post_{it} \times T_{it} + u_{it}$ where $i$ refers to individuals and $t=1,2$ to the first (pre ...
0
votes
0answers
49 views

Difference-in-Difference Estimator: valid research design

I just saw a study that applied the following difference-in-difference estimator: $Y_{it} = \alpha + \alpha_1 T_{it} + \alpha_2 Post_{it} + \alpha_3 Post_{it} \times T_{it} + u_{it},$ where $i$ ...
3
votes
1answer
235 views

difference-in-difference regression run as quantile regression

The usual regression equation used to estimate difference-in-difference is the following: y i t = β 0 + β 1 Treat + ...
0
votes
0answers
16 views

Difference-in-Differences: y variable as quantity at monthly level

I want to estimate a difference-in differences equation with the following "background story": I have a data set of apartment listings for the months of November 2014-November 2017. Some of the ...
1
vote
0answers
17 views

Exogenous shock that affects two groups differently

I want to know if difference in difference is appropriate for my research question, if not, what would you suggest instead? I have two groups of observations (let's call them group A and group B) ...
1
vote
0answers
58 views

Post dummy in multiple groups and time periods DiD estimation

I have a question regarding an answer of another question posted here. My dataset seems comparable and has different policy treatment timings for different firms. The answer outlines how to construct ...