Econometrics - Difference in Differences

  Рет қаралды 13,615

Econometrics, Causality, and Coding with Dr. HK

Econometrics, Causality, and Coding with Dr. HK

Күн бұрын

This video discusses the most common design in modern microeconomics - difference-in-difference! What's it all about, how does it work, how can we do it, and what assumptions do we need to make, like parallel trends?

Пікірлер: 37
@MrHobbelhase
@MrHobbelhase 4 жыл бұрын
Such an intuitive way to explain DiD! Spectacular slides & awesome flow
@johannesh1741
@johannesh1741 4 жыл бұрын
Super interesting! Thanks a lot for the DiD explanation video with the highest quality on KZbin - very helpful :)
@NickHuntingtonKlein
@NickHuntingtonKlein 4 жыл бұрын
Glad you like it!
@chiaracappellini1525
@chiaracappellini1525 2 жыл бұрын
Such a clear explanation, thanks!
@arunbhat7890
@arunbhat7890 2 ай бұрын
really good explaination
@KP-pj4bq
@KP-pj4bq 3 жыл бұрын
Thanks for this amazing explanation, I've already watched some videos here today but the more I watched, the more confused I became - Now I finally understand what DiD is about - need it for my thesis :) Thank you so much!!!
@hunterisaias5853
@hunterisaias5853 3 жыл бұрын
Sorry to be off topic but does someone know of a tool to get back into an Instagram account? I stupidly forgot my login password. I would love any tips you can offer me!
@TateVanPatten
@TateVanPatten Жыл бұрын
why can't you just use time series techniques to create a difference in forecasted difference when trends are not parallel?
@NickHuntingtonKlein
@NickHuntingtonKlein Жыл бұрын
Some people do this. It works in some limited circumstances. Keep in mind parallel trends is about counterfactual trends so you'd need a way to forecast the counterfactual. I do discuss the use of trend adjustment in did in my did chapter on theeffectbook.net
@samerfahed7236
@samerfahed7236 3 жыл бұрын
Thank you for the video and a good explanation of the theory. I have a question, could we use DiD to compare treatment in the CPI (for example) between two countries? Or should the groups be (Treated and Control) always in the same country?
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
You can certainly use DID across countries. There's nothing *statistically* wrong with that. The key is whether you still believe the parallel trends assumption. The bigger you go and the more different your treatment and control groups are, the more "other stuff" is going on at the same time as your treatment, making it less plausible that parallel trends holds. But if you have good reason to believe it *does* hold theoretically, then there's nothing wrong with cross-country.
@oaholla3855
@oaholla3855 3 жыл бұрын
Thanks alot for this intuitive explanation of DiD. I am shocked there are only 39 likes .
@jackcela9703
@jackcela9703 2 жыл бұрын
bro just made my thesis paper 10x easier to write.
@danhan7028
@danhan7028 3 жыл бұрын
How common is the use of R/tidy for a career involving econometrics?
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
Depends on where you're going into. In academia and policy research centers centers it's Stata/R (although that might tilt R/Stata soon). In tech it's Python/R. It makes a showing in finance too but I'm not sure how prominent.
@marcopozzan445
@marcopozzan445 3 жыл бұрын
Hello Nick! I am currently writing my master thesis on the influence of ESG on stock returns during the pandemic crisis. I am using a dif in dif for studying the causality between ESG score (treatment) and the current pandemic (time dummy). Is ESG as a dummy (one if the company qualifies in the top quartile, ESG score is last measured in 2018) qualified? I am worrying about self-selection bias. Can DiD fixed effects be a solution? Thank you in advance!
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
This doesn't sound like dif in dif at all. For DID you need a treated group and a control group. Everyone is affected by the pandemic so there's no control group here. This sounds instead like a regression with an interaction term.
@ivandn3876
@ivandn3876 2 жыл бұрын
I think your videos are pretty straightforward. Thanks for sharing all your knowledge in Econometrics. I am dealing with homework, and I am wondering if there is any chance to contact you to get some help. Thank you.
@NickHuntingtonKlein
@NickHuntingtonKlein 2 жыл бұрын
Hi Ivan, glad you like the videos! I'm afraid I don't have time to provide one on one help though.
@cattyoctavia4122
@cattyoctavia4122 2 жыл бұрын
Hi sir, may i ask what is the difference between event study and difference in differences? Thankyou
@NickHuntingtonKlein
@NickHuntingtonKlein 2 жыл бұрын
"event study" refers to a lot of different things in different fields. In some fields it's a before/after comparison without a control group (whereas DID has a control group). In other fields it's a variant of DID where you allow the effect to vary over time
@janetmugo5956
@janetmugo5956 3 жыл бұрын
This is a great explanation, thanks.
@edwardsmith703
@edwardsmith703 2 жыл бұрын
Great explanation
@togoyaya178
@togoyaya178 3 жыл бұрын
Thank you so much Nick for this interesting explanation. Is your dependent variable a binary variable or not? I want to run DID using a binary variable (positive or negative for malaria test), some suggest me to use poisson regression for the DID. What do you think about that?
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
Commonly did with a binary dependent variable uses OLS anyway. With a "saturated" model like did where the predictors are all binary, the linear probability model downsides are much reduced. That said, there are also methods specifically designed for nonlinear did. I believe Athey and Imbens have a paper on it
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
In any case, if the outcome is positive/negative you wouldn't be using poisson anyway, that's for count variables not binary
@togoyaya178
@togoyaya178 3 жыл бұрын
@@NickHuntingtonKlein Thank you so much for your response. Of course, it is converted into 0/1 (count variable) for the poisson regression. My issue is about the offset variable. I don't have any offset variable, can rue the poisson régression without offset?
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
@@togoyaya178 I mean poisson is designed for count variables. So if it was "how many times do you get sick" the poisson would make sense. But for "did you get sick of not" it doesn't, you'd want probit or logit instead (or for did, OLS may be fine). The offset is used when you want to account for the length of time you're allowing the variable to count up
@togoyaya178
@togoyaya178 3 жыл бұрын
@@NickHuntingtonKlein Got it, thank you so much for those informations. I will look at some articles on probit and logit.
@JM-fr9bc
@JM-fr9bc 3 жыл бұрын
High Nick, how would the model look if you want to introduce a bunch of control variables with panel data with more than 2 periods?
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
Panel data with more than 2 periods is simple, just add fixed effects for time period (technically this is what hte "After" control is anyway). Control variables are a bit trickier. You CAN just add them to the regression equation as normal, but they don't always work as you expect them to. See Callaway and Sant'Anna (2020) for how to include covariates when treatment is staggered (some groups get treated earlier than others), or more generally see this paper arxiv.org/abs/1911.12185
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
Or this explainer causalinf.substack.com/p/a-tale-of-time-varying-covariates
@JM-fr9bc
@JM-fr9bc 3 жыл бұрын
@@NickHuntingtonKlein Nick, thanks so much for your response and the resources. So with more than two periods I wouldn't need additional time dummies because as you mentioned in the video, 'After' is in fact the fixed effect for time? Wooldridge in some cases inserts a fixed effect alpha-sub-i (and removes the interaction term and group dummy, confusing the heck out of me), but than does that mean, as in your video, that the dummy 'Treated' is the fixed effect for each of the two groups? Lastly, what is staggered adoption design and what are its benefits? They seem to be linked with multiple time periods as in the Callaway paper (trying to wrap my mind around it). Thanks so much!
@NickHuntingtonKlein
@NickHuntingtonKlein 3 жыл бұрын
@@JM-fr9bc you want the time dummies in place of "after" since the after dummy only accounts for before/after differences but the time dummies do it all, improving the estimate. Alpha-sub-i in Wooldridge IS the group fixed effect. That's a common way of writing a FE equation, as it shows you're letting the intercept vary over each individual. Same thing for alpha-sub-t and time dummies. And I'm guessing he replaced the interaction with "Treated" or something like that which indicates "treated group in the post treatment period" which is exactly what the interaction term gives you Staggered rollout is when you have multiple treated groups that begin their treatment at different times. When this happens, two way fixed effects (like you're doing) no longer properly identifies the DID effect
@JM-fr9bc
@JM-fr9bc 3 жыл бұрын
@@NickHuntingtonKlein Thanks Nick, I'm slowly but surely getting there. So dif-dif can be ran with just two periods (before/after), but then with panel data with multiple years it's still a dif-dif because if replace the "after" with let's say 20 "time" dummies for 21 years of observations, each year gets subtracted by the previous year, and there by eliminating the single alpha-sub-i? If Wooldridge' general model for two periods is yit = a1 + d1 + d2d2t + d3d3t + b1xit1 + … + bkxitk + ai + uit. and for more then 3 periods is ∆yit = a0 + a3(d3t) + a4(d4t) + … + aT(dTt) + bk(∆xitk) + ∆uit, t=2,3,4,...T then can you show me which term is the "after" or "group"? or even yet where the heck the differencing takes place. Thanks!!
Econometrics - The ABCDEF of Problems with Experiments
13:35
Econometrics, Causality, and Coding with Dr. HK
Рет қаралды 1,2 М.
Econometrics - Within Variation and Fixed Effects
20:06
Econometrics, Causality, and Coding with Dr. HK
Рет қаралды 15 М.
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,6 МЛН
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Causal Inference -- 17/23 -- Difference-in-Differences Basics I
22:16
Intuitive MetriX – Ben Elsner
Рет қаралды 2,6 М.
What Language Should You Use for Econometrics?
20:51
Econometrics, Causality, and Coding with Dr. HK
Рет қаралды 4,3 М.
9 - Difference-in-Differences
33:01
Brady Neal - Causal Inference
Рет қаралды 9 М.
Synthetic Control Explained
8:23
FinanceAndEconomics
Рет қаралды 7 М.
Staggered Treatment in Difference-in-Differences (The Effects, Videos on Causality, Ep 56)
9:02
Econometrics, Causality, and Coding with Dr. HK
Рет қаралды 14 М.
Causal Inference: A Simple Difference-in-Difference Model
26:38
Mike Jonas Econometrics
Рет қаралды 58 М.
Susan Athey: Synthetic Difference in Differences
1:07:09
Online Causal Inference Seminar
Рет қаралды 16 М.
Introduction to difference in differences in Stata 17
59:06
SDAS TechTips @sdas_anz
Рет қаралды 11 М.
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,6 МЛН