Statistical inference can be difficult and counterintuitive. My impression is that too often people treat statistics as if its a kind of magicperhaps a dark magic. For all our efforts as educators, we havent made satisfying progress toward helping people understand how to think about and handle data. Its tempting to affirm results we want to believe by treating raw correlation as causation or to deny results we dont want to believe by saying correlation isnt causation. Fortunately, statisticians and economists and others who handle data have done a very good job developing the tools we need to reasonably infer causality from observational and non-experimental data.
One such economist is Cal State-Fullerton economist Nick Huntington-Klein, who has created a website that explains the technical and intuitive details behind a lot of different techniques for causal inference. His site does more than this, though: he has created short animations that allow us to very clearly visualize exactly what is going on when someone deploys a particular technique.
If you are trying to learn (or trying to teach) techniques of causal inference, Dr. Huntington-Kleins animations will, I hope, be revelatory. He has also posted his animations on Twitter, and you can watch them below. In addition, he has generously made available all of the statistical code he has used to create the animations.
These struck me for a few reasons. First, theyre beautifully and brilliantly done, and I expect they will help generations of scholars, teachers, and students better understand exactly what is going on when they enter commands into programs like Stata and Excel or write code in R. Second, its an outstanding example of service to the economics profession specifically and service to the academic project more generally. In addition to these causal inference animations, Dr. Huntington-Klein has also created a lot of other economics instructional videos that Im sure help his students at CSUF and that will, I think, be of substantial use to people looking for creative, innovative, and intuitive ways to help people master the economic way of thinking.
In addition to Huntington-Kleins videos and animations, people interested in econometrics and statistics would also do well to consult Causal Inference: The Mixtape by Baylor University economist Scott Cunningham. Its a $0 online book along with examples and exercises that use the popular statistics program Stata. Stata and similar programs are pricey, but resources like R are open to anyone. The kind of work that used to be possible only for people with university mainframes and armies of research assistants can now be done by just about anyone with access to a reasonably-priced computer.
At the moment, I dont teach courses in quantitative methods. The next time I do, however, I plan to use these resources. The academy would be a better place if we followed the examples of Drs. Huntington-Klein and Cunningham and created more open resources others can use in their teaching and scholarship.
As requested, slower graphs! Also added a graph on collider bias, the webpage explanation helps there.
Nick HK (@nickchk) November 29, 2018
These graphs are intended to show what standard causal inference methods actually *do* to data, and how they work.
This is what controlling for a binary variable looks like: pic.twitter.com/dTZxqY5JxA