# Causal inference on DAGs

Confounding! This scientist performed a miracle graph surgery intervention and you won’t believe what happened next

October 26, 2016 — August 6, 2022

Making valid statistical inference, in the sense of making inference that is compatible with our understanding of the causal relationships that exist in the world (not just the correlations in our data). Graphical models and related techniques for doing it. Avoiding the danger of folk statistics. Observational studies, confounding, adjustment criteria, *d*-separation, identifiability, interventions, moral equivalence… Avoidance of Ecological fallacy/ Simpson’s paradox.

The gold standard, of course, is to work out if A causes B by doing an experiment where no input but A changes, then observing B, which is what a controlled trial is. In practice this is unattainable because it would usually require cloning the entire state of the universe and running multiple copies in parallel. Statistically it can be nearly as good to do the experiment where we change A and all other influences apart from are at least uncorrelated with A, which is more usually what we do — a randomised controlled trial. In many circumstances though, (budget restrictions, ethical constraints, bad experimental design…) we cannot do these ideal experiments, and a mathematical crutch is needed to get us the next-best outcome, which is to control for the things that we *must* (and not control for the things we must not).

In classic-flavoured causal inference, we use graphical models with the additional assumption that \(A\rightarrow B\) may be read as “A causes a change in B”. This is what you end up with if you use a Structural Equation Model (a.k.a. hierarchical models) to impose a causal structure on the observations. The result is a particular type of graph, a Directed Acyclic Graph_ (DAG) which, informally put, summarises what can possibly affect what in the model. Slightly more formally, it summarises what *cannot* (conditionally) affect what. C&C conditional treatment effect estimation by potential outcomes.

With this tool in hand I can answer the question of when I can use my crappy observational data, collected without a good experimental design for whatever reason, to do interventional inference? There is a lot of research in this area; I should summarise the salient bits for myself.

## 1 What can go wrong?

What can I *actually* identify? For a start, if we are resorting to this more difficult methodology that *already* suggests that we might be trying to use data which was collected with no regard to our actual statistical needs, and thus we might really stretch to imagine that we can actually find actual appropriate instruments in the data. Here is an essay on that theme.

OMFG Exogenous Variation! Or, Can You Find Good Nails When You Find an Indonesian Politics Hammer quotes Angus Deaton

we have at least some control over the light but choose to let it fall where it may and then proclaim that whatever it illuminates is what we were looking for all along

## 2 Teaching

Yanir Seroussi’s Causal inference resources recommends

Causal Diagrams: Draw Your Assumptions Before Your Conclusions. A high-level introduction to causal diagrams by Miguel Hernán. Highly recommended for those who want to get a conceptual overview of how causal diagrams work and why they’re useful.A/B Testing by Google: Online Experiment Design and Analysis. Experimentation is key to causal inference, with the online world offering an accessible ground for running experiments. This short course is worth doing if you’re involved in online experiments in any way.

Miguel Hernán and Jamie Robins’ causal inference book (Miguel A. Hernán and Robins 2020) is available in free draft form online. See Yanir Seroussi’s review.

Jonas Peters’ notes from his teaching in 2015 (I think I took this course).

- An Introduction to Bayesian Network Theory and Usage
- pgmpy_notebook/2. Bayesian Networks.ipynb at master · pgmpy/pgmpy_notebook
- cs228 notes

Samantha Kleinberg wrote two classes, introductory and advanced. The latter is notable for handling for time-dependent causality.

Tutorial: David Sontag and Uri Shalit, Causal inference from observational studies. Mastering Metrics: The Path from Cause to Effect A resource list for causality in statistics, data science and physics.

Brady Neal’s Introduction to Causal Inference includes his draft textbook.

Felix Elwert’s summary. (Elwert 2013)

Chapter 3 of (some edition of) Pearl’s book is available as an author’s preprint: Part 1, 2, 3, 4, 5, 6.

Stanford encyclopaedia of philosophy entry.

Various classic introductions (Pearl 2012, 1998; Elwert 2013; Morgan and Winship 2015; Rohrer 2018). Notably not recommended as a pedagogic experience (Koller and Friedman 2009) (although as a reference text it is great and will make you smarter).

The dagitty intro is an interactive guide via visualizations. Likewise, the ggdag bias structure vignette shows of the useful explanation diagrams available in `ggdag`

and is also a good introduction to selection bias and causal DAGs themselves.

Amit Sharma’s tutorial at KDD. See also Emily Riederer’s Causal design patterns for data analysts Spurious correlation induced by sampling bias.

Still confused? Overwhelmed? I am. How about a diagram?

## 3 Instrumental variables

## 4 References

*Statistical Methods in Medical Research*.

*PMLR*.

*Physical Review X*.

*arXiv:1703.04025 [Cs, Stat]*.

*Proceedings of the National Academy of Sciences*.

*Conditional Specification of Statistical Models*.

*arXiv:1902.07409 [Stat]*.

*arXiv:1702.02604 [Cs, Stat]*.

*Proceedings of the National Academy of Sciences*.

*AAAI*.

*New Journal of Physics*.

*arXiv:1812.03253 [Cs, Stat]*.

*Uncertainty in Artificial Intelligence*.

*arXiv:1507.03652 [Math, Stat]*.

*Proceedings of the 27th ACM International Conference on Information and Knowledge Management*. CIKM ’18.

*arXiv:1611.06221 [Cs, Stat]*.

*arXiv:1803.08784 [Cs, Stat]*.

*arXiv:1611.06221 [Cs, Stat]*.

*arXiv:1209.2355 [Cs, Math, Stat]*.

*Scientific Reports*.

*Philosophy of Science*.

*Structural Equation Modeling: A Multidisciplinary Journal*.

*arXiv:1301.0560 [Cs]*.

*The Annals of Applied Statistics*.

*Mathematical Methods of Operations Research*.

*Statistical Science*.

*Annual Review of Statistics and Its Application*.

*Statistical Methods in Medical Research*.

*Neural Computation*.

*Physical Review Letters*.

*arXiv:1411.1557 [Stat]*.

*The Annals of Statistics*.

*Journal of Causal Inference*.

*Biometrika*.

*NIPS Causality: Objectives and Assessment*.

*Granger-Causality Graphs for Multivariate Time Series*.

*Handbook of Causal Analysis for Social Research*. Handbooks of Sociology and Social Research.

*Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics*.

*arXiv:1405.1868 [Stat]*.

*arXiv:2104.04103 [Cs, Stat]*.

*Games for the superintelligent*.

*The Astrophysical Journal*.

*Journal of the American Statistical Association*.

*Synthese*.

*American Journal of Sociology*.

*Applied Bayesian Modeling and Causal Inference From Incomplete-Data Perspectives*.

*arXiv:2010.12237 [Cs]*.

*Annual Review of Statistics and Its Application*.

*Philosophy of Science*.

*arXiv:1403.2310 [Stat]*.

*Electronic Journal of Probability*.

*Annals of Epidemiology*.

*American Journal of Public Health*.

*Causal Inference Vol 3*.

*Causal Inference Vol 2*.

*Causal Inference Vol 1*.

*Causal Inference: What If*.

*Proceedings of the 10th International Workshop on Artificial Intelligence and Statistics*.

*Advances in Neural Information Processing Systems 21*.

*arXiv:2012.08154 [Cs, Stat]*.

*The Annals of Statistics*.

*Artificial Intelligence*.

*IEEE Transactions on Information Theory*.

*International Conference on Machine Learning*.

*arXiv:1605.03661 [Cs, Stat]*.

*Learning in Graphical Models*.

*The Handbook of Brain Theory and Neural Networks*.

*Handbook of Neural Networks and Brain Theory*.

*Journal of Machine Learning Research*.

*Journal of Machine Learning Research*.

*Journal of Machine Learning Research*.

*arXiv Preprint arXiv:1510.04740*.

*Advances in Neural Information Processing Systems 30*.

*IJCAI*.

*Causality, Probability, and Time*.

*Why: A Guide to Finding and Using Causes*.

*arXiv:1709.02023 [Cs, Math, Stat]*.

*Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing*.

*Annual Review of Statistics and Its Application*.

*Probabilistic Graphical Models : Principles and Techniques*.

*Proceedings of the National Academy of Sciences*.

*Graphical Models*. Oxford Statistical Science Series.

*Complex Stochastic Systems*.

*Journal of the Royal Statistical Society. Series B (Methodological)*.

*arXiv:1811.12359 [Cs, Stat]*.

*arXiv:1605.08179 [Cs, Stat]*.

*Advances in Neural Information Processing Systems 30*.

*arXiv Preprint arXiv:1307.5636*.

*Nature Methods*.

*The Annals of Statistics*.

*arXiv:1903.03662 [Stat]*.

*Proceedings of the National Academy of Sciences*.

*2018 IEEE Data Science Workshop (DSW)*.

*New England Journal of Medicine*.

*Proceedings of the 24th International Conference on Machine Learning*.

*UAI2018*.

*Journal of Machine Learning Research*.

*Counterfactuals and Causal Inference*.

*Cancer Investigation*.

*Machine learning: a probabilistic perspective*. Adaptive computation and machine learning series.

*arXiv:1911.06030 [Stat]*.

*Course Lecture Notes (Draft)*.

*Learning Bayesian Networks*.

*arXiv:1910.08527 [Cs, Stat]*.

*Advances In Neural Information Processing Systems*.

*International Journal of Epidemiology*.

*Social Networks*.

*arXiv:2110.10819 [Cs]*.

*Nature*.

*Proceedings of the Second AAAI Conference on Artificial Intelligence*. AAAI’82.

*Artificial Intelligence*.

*Quantified Representation of Uncertainty and Imprecision*. Handbook of Defeasible Reasoning and Uncertainty Management Systems.

*Probabilistic reasoning in intelligent systems: networks of plausible inference*. The Morgan Kaufmann series in representation and reasoning.

*Statistics Surveys*.

*Causality: Models, Reasoning and Inference*.

*Sociological Methodology*.

*Statistical Science*.

*Causal Inference in Statistics: A Primer*.

*arXiv:1501.01332 [Stat]*.

*Elements of Causal Inference: Foundations and Learning Algorithms*. Adaptive Computation and Machine Learning Series.

*The Journal of Machine Learning Research*.

*2011 49th Annual Allerton Conference on Communication, Control, and Computing (Allerton)*.

*Proceedings of the 27th ACM International Conference on Information and Knowledge Management*. CIKM ’18.

*Current Epidemiology Reports*.

*Annals of Statistics*.

*Latent Variable Modeling and Applications to Causality*. Lecture Notes in Statistics.

*Advances in Methods and Practices in Psychological Science*.

*arXiv:1801.06229 [Stat]*.

*Journal of Machine Learning Research*.

*Uncertainty in Artificial Intelligence*.

*arXiv:1707.00819 [Cs, Stat]*.

*Statistical Science*.

*Use of Directed Acyclic Graphs*.

*Probabilistic and Causal Inference: The Works of Judea Pearl*.

*arXiv:1505.03036 [Astro-Ph, Stat]*.

*ICML 2012*.

*Proceedings of the IEEE*.

*arXiv:1501.06794 [Cs, Stat]*.

*Proceedings of the 31st International Conference on Neural Information Processing Systems*. NIPS’17.

*arXiv:1607.06565 [Physics, Stat]*.

*Sociological Methods & Research*.

*Cause and Correlation in Biology: A User’s Guide to Path Analysis, Structural Equations and Causal Inference with R*.

*The Journal of Machine Learning Research*.

*arXiv:1411.2127 [Stat]*.

*BMC Medical Research Methodology*.

*Proceedings of the Conference on Empirical Methods in Natural Language Processing*.

*arXiv:2007.04511 [Stat]*.

*Causation, Prediction, and Search*. Adaptive Computation and Machine Learning.

*The 22nd International Conference on Artificial Intelligence and Statistics*.

*Journal of Epidemiology*.

*arXiv:1508.00280 [Cs]*.

*Proceedings of the Twenty-Seventh Conference on Uncertainty in Artificial Intelligence*. UAI’11.

*arXiv:1710.05899 [Cs]*.

*arXiv:1807.04010 [Cs, Stat]*.

*Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence*. AAAI’16.

*Proceedings of the UAI 2014 Conference on Causal Inference: Learning and Prediction - Volume 1274*. CI’14.

*Proceedings of the 24th International Conference on Artificial Intelligence*. IJCAI’15.

*Statistical Methods in Medical Research*.

*arXiv:1407.2483 [Cs, Stat]*.

*Evolution*.

*arXiv:1710.02428 [Astro-Ph]*.

*arXiv:2002.06060 [q-Bio, Stat]*.

*PLOS ONE*.

*arXiv:2007.10979 [Cs, Stat]*.

*The Annals of Mathematical Statistics*.

*arXiv:1611.04660 [Cs, Stat]*.

*arXiv:2004.08697 [Cs, Stat]*.

*Exploring Artificial Intelligence in the New Millennium*.

*arXiv:1202.3775 [Cs, Stat]*.

*Advances in Neural Information Processing Systems 31*.