Causal Inference in R (for people who prefer code over maths)

A series of blog posts explaining key causal inference concepts and methodologies in my own words, with lots of R code examples, visualizations and memes. Low-key aimed towards people like me, who find these ideas easier to grasp with code/algorithms and simulations rather than with math notation.

  1. Introduction to causal diagrams (DAGs) (available in Spanish)

  2. Potential Outcomes Model (or why correlation is not causality) (available in Spanish)

  3. Randomization Inference in R: a better way to compute p-values in randomized experiments (available in Spanish)

  4. Matching in R (I): Subclassification, Common Support and the Curse of Dimensionality

  5. Matching in R (II): Differences between Matching and Regression

  6. Matching in R (III): Propensity score, Weighting and the Double Robust Estimator

Work in progress, more posts to come…

Largely based on these excellent books:

Francisco Yirá
Francisco Yirá
Data Scientist

R, Python, causal inference, machine learning, data visualization.