Watched a lot of videos regarding this topic but this was the most helpful one. For me, it tackles the main problem when it comes to topics like this: Students need to SEE what getting rid of between variation does to the model as you have shown on one of the graphs. Once I saw that it was 70% easier to comprehend what you were trying to explain ...And this should definitely have more views! Keep it up!
This is so helpful! I am reading the Wooldridge text on pooling cross-sections across time and this visualization about fixed effects was great!! Thank you.
This explanation is just out of this world. Just one question, when you have the dummy variable output, does that mean that you would have as many tables as the number of counties? Where is the dummy variable in that output? Thanks!
This is really helpful for me. Could I understand demean is actually remove the influence of something we cannot observe but is unique to that individual? Thank you for your sharing and for your reply.
That's right. It removes anything about that individual that is constant over time. It will not remove things unique to that individuals that also change over time.
Thanks for the informative video! I am looking to add fixed effects to a multinomial logit model in R. Could I use either the group_by or LSDV methods in such a model and how would I adapt them if necessary? Thanks in advance!
The group_by method won't work for nonlinear models, and lsdv won't work either unless the set of fixed effects is very small. When multinomial logit gets individual effects added, it's usually in the form of random effects instead of fixed effects, and then you're wading into deep waters! Look for info on the mixed logit model.
@@NickHuntingtonKlein Thanks for your reply! I see, that might be getting a bit too complex. What about means centering? Or, as a less than ideal solution, adding dummies for each country? There are 8 countries and roughly between 400 and 600 observations, not such a big sample, I know, but that has to do with the nature of the data.
In that graphic - which was amazingly helpful! - the numbers on the axes are changing too right? All the measurements are being put on the same scale somehow? It's very hard to understand otherwise, since those measurements can't just jump around arbitrarily...?
When it goes from overall variation to within, the axis numbers are changing, yes. Whatever the mean value for each individual was before is now set to 0.
This is an amazing video! In the last slide, you mentioned that fixed effects won't work for predictors with little within variation. Your example about government change makes total sense (i.e., slowly changing predictor), however, what are the criteria for 'little' within variation? Let's say you have a sample of N=200 and T = 5 and 150 groups don't change at all over time whereas 50 groups do, would this be considered a rare change?
Hi Nick, great video and brilliant explanation! Would you mind explaining the interacted fixed effects, for example, industry-year fixed effects? Is it the within industry-year variation that is used for identification? What do the industry-year fixed effects control for? I want to picture this in your amazing graphics but couldn't figure out. Thanks so much.
With interacted fixed effects it's sometimes easier to think of them as a single fixed effect for a combined variable. Imagine you smashed together Industry and Year to get IndustryYear with values like "Retail 2011", "Retail 2012", and then did FE for that. Thinking of it that way should make it a bit more clear what it's doing - it's isolating variation within those groups. So it's using within-industry-year variation, just as you mentioned. Regressing Y on X with the industry-year FE, the coefficient on X is "a firm with an X value one unit higher than another firm in the same industry and year would be expected to have a Y that is (coefficient) units higher"
Thank you so much, your videos and online book The Effect are helping me out a lot. I just wanted to ask: say you want to evaluate the effect of a policy intervention (e.g. the relation between more government spending on safety/police capacity and crime rates) with the fixed effects method, and you have a panel dataset of countries that implemented such an intervention at some point in time. Is it necessary to have a control group in which this policy was not implemented, e.g. do you need a treatment and control group? Or would it suffice, for the fixed method, to just have cases that only implemented this policy?
Glad you like the book! In the case you're discussing, this is more a difference-in-differences design than straight up fixed effects. Using only treated countries is feasible, as long as treatment went into place at different times in different countries. This is called a rollout design. However, fixed effects approaches to DID don't work with rollout designs, you need alternate estimation methods. See the How the Pros Do It section in my DID chapter.
@@NickHuntingtonKlein Thank you so much! If I understood correctly, having (1) different moments of intervention (2) and different countries is a prerequisite to remove the between variation between units. As I do have 27 countries who were exposed to this policy at different points in time (EU Member States) - and in the absence of good control units - this rollout design sounds really good!
Great video! What if your dependent variable were binary and you were working with a non-linear model such as logit or probit? If you demean that variable, it is no longer binary, is it? How would you proceed then after demeaning? Is it not possible to use that procedure in non-linear specifications?
You can do fixed effects with probit/logit, but the same procedures (adding all the dummies or demeaning) no longer work. A lot of researchers just use linear probability models (OLS despite the binary dependent variables) when there are fixed effects. Or you can use a command specifically designed for it. Look for "fixed effects probit" or "fixed effects logit" estimators in your language of choice. In R, the fixest package has a full set of the estimators you'd need.
I see that this video came out after the plm video. (th-cam.com/video/2igMNODFypk/w-d-xo.html) Maybe I got things wrong and the videos aren't on the same subject? Or maybe the plm package is outdated, and now there are better ways of running a fixed effects model in R?
Haha honestly at this point I don't use plm or lm_robust, I use feols from the fixest package, which doesn't handle random effects but is faster and has all kinds of nice features. I know it's confusing. Here's my video on fixest th-cam.com/video/bQZGDKrbHoA/w-d-xo.html
Watched a lot of videos regarding this topic but this was the most helpful one. For me, it tackles the main problem when it comes to topics like this: Students need to SEE what getting rid of between variation does to the model as you have shown on one of the graphs. Once I saw that it was 70% easier to comprehend what you were trying to explain ...And this should definitely have more views! Keep it up!
I watched many videos on this topic, but this one was the best.
Phenomenal explanation, thanks Nick. :)
Brilliant explanation, graphic made it very clear as well. Thanks Nick!
Excellent explanation! Great visuals with the graphs! Thanks
Brilliant stuff! The graphics were especially helpful!
Very good. This should have many more views!
Super helpful video! Very good that you covered the topic so thoroughly! Helped me a lot - thank you very much!
really good explainatition
Incredible explanation, thanks!
you're a legend mate, thanks so much!
This is so helpful! I am reading the Wooldridge text on pooling cross-sections across time and this visualization about fixed effects was great!! Thank you.
You explain very well!!😊
This explanation is just out of this world. Just one question, when you have the dummy variable output, does that mean that you would have as many tables as the number of counties? Where is the dummy variable in that output? Thanks!
This is a really great video! Thanks for posting :)
Thank you Nick, this video really help me a lot!
Very good video on this topic, the graphics really work for me. Thnx!
Great stuff. Very easy to understand.
This is really helpful for me. Could I understand demean is actually remove the influence of something we cannot observe but is unique to that individual? Thank you for your sharing and for your reply.
That's right. It removes anything about that individual that is constant over time. It will not remove things unique to that individuals that also change over time.
@@NickHuntingtonKlein Thank you so much! I appreciate your quick reply!
Thank you so much for this wonderfully visualised explanation! Helped me a lot with my thesis
Very understandable, great channel overall,
Such a well-explained video. Thank you! The visualization and explanation of the various axes was especially helpful!
great graphic at 8:15
Thanks for the informative video! I am looking to add fixed effects to a multinomial logit model in R. Could I use either the group_by or LSDV methods in such a model and how would I adapt them if necessary? Thanks in advance!
The group_by method won't work for nonlinear models, and lsdv won't work either unless the set of fixed effects is very small. When multinomial logit gets individual effects added, it's usually in the form of random effects instead of fixed effects, and then you're wading into deep waters! Look for info on the mixed logit model.
@@NickHuntingtonKlein Thanks for your reply! I see, that might be getting a bit too complex. What about means centering? Or, as a less than ideal solution, adding dummies for each country? There are 8 countries and roughly between 400 and 600 observations, not such a big sample, I know, but that has to do with the nature of the data.
@@Jorissim0 Means centering is the group_by approach, which won't work here. With only 8 countries you might be okay to add dummies.
@@NickHuntingtonKlein okay, thanks a lot!
In that graphic - which was amazingly helpful! - the numbers on the axes are changing too right? All the measurements are being put on the same scale somehow? It's very hard to understand otherwise, since those measurements can't just jump around arbitrarily...?
When it goes from overall variation to within, the axis numbers are changing, yes. Whatever the mean value for each individual was before is now set to 0.
@@NickHuntingtonKlein thanks king
Great content!
This is an amazing video! In the last slide, you mentioned that fixed effects won't work for predictors with little within variation. Your example about government change makes total sense (i.e., slowly changing predictor), however, what are the criteria for 'little' within variation? Let's say you have a sample of N=200 and T = 5 and 150 groups don't change at all over time whereas 50 groups do, would this be considered a rare change?
There's not a hard cutoff or anything, but in that case you'd only be getting a treatment effect for the 50 who see change.
Hi Nick, great video and brilliant explanation! Would you mind explaining the interacted fixed effects, for example, industry-year fixed effects? Is it the within industry-year variation that is used for identification? What do the industry-year fixed effects control for? I want to picture this in your amazing graphics but couldn't figure out. Thanks so much.
With interacted fixed effects it's sometimes easier to think of them as a single fixed effect for a combined variable. Imagine you smashed together Industry and Year to get IndustryYear with values like "Retail 2011", "Retail 2012", and then did FE for that.
Thinking of it that way should make it a bit more clear what it's doing - it's isolating variation within those groups. So it's using within-industry-year variation, just as you mentioned. Regressing Y on X with the industry-year FE, the coefficient on X is "a firm with an X value one unit higher than another firm in the same industry and year would be expected to have a Y that is (coefficient) units higher"
Thank you so much, your videos and online book The Effect are helping me out a lot. I just wanted to ask: say you want to evaluate the effect of a policy intervention (e.g. the relation between more government spending on safety/police capacity and crime rates) with the fixed effects method, and you have a panel dataset of countries that implemented such an intervention at some point in time. Is it necessary to have a control group in which this policy was not implemented, e.g. do you need a treatment and control group? Or would it suffice, for the fixed method, to just have cases that only implemented this policy?
Glad you like the book!
In the case you're discussing, this is more a difference-in-differences design than straight up fixed effects. Using only treated countries is feasible, as long as treatment went into place at different times in different countries. This is called a rollout design. However, fixed effects approaches to DID don't work with rollout designs, you need alternate estimation methods. See the How the Pros Do It section in my DID chapter.
@@NickHuntingtonKlein Thank you so much! If I understood correctly, having (1) different moments of intervention (2) and different countries is a prerequisite to remove the between variation between units.
As I do have 27 countries who were exposed to this policy at different points in time (EU Member States) - and in the absence of good control units - this rollout design sounds really good!
Great video! What if your dependent variable were binary and you were working with a non-linear model such as logit or probit? If you demean that variable, it is no longer binary, is it? How would you proceed then after demeaning? Is it not possible to use that procedure in non-linear specifications?
You can do fixed effects with probit/logit, but the same procedures (adding all the dummies or demeaning) no longer work. A lot of researchers just use linear probability models (OLS despite the binary dependent variables) when there are fixed effects. Or you can use a command specifically designed for it. Look for "fixed effects probit" or "fixed effects logit" estimators in your language of choice. In R, the fixest package has a full set of the estimators you'd need.
@@NickHuntingtonKlein thank you!
I see that this video came out after the plm video. (th-cam.com/video/2igMNODFypk/w-d-xo.html)
Maybe I got things wrong and the videos aren't on the same subject? Or maybe the plm package is outdated, and now there are better ways of running a fixed effects model in R?
Haha honestly at this point I don't use plm or lm_robust, I use feols from the fixest package, which doesn't handle random effects but is faster and has all kinds of nice features. I know it's confusing. Here's my video on fixest th-cam.com/video/bQZGDKrbHoA/w-d-xo.html
I would like french people explaining this 😢