# Useful R Packages for Causal Inference in the Social Sciences

The table below lists R packages that I have found useful for causal inference in the social sciences, particularly political science. I regularly teach Causal Inference as part of the methods sequence at MIT Political Science, so this post mainly serves a convenient place to send students when teaching that course. Nevertheless, it may be useful to other applied researchers.

Of course, the table below is by no means exhaustive, but merely reflects what I’ve used in the course of research and teaching. Please contact me if you have any additional suggestions or comments.

PackageNotes

This package is a workhorse package for regression modeling. One of its chief strengths is that it allows for the fast estimation of models with high dimensional fixed effects. It also has functionality for instrumental variables regression and allows for heteroskedastic/cluster robust standard errors.

This package has my goto drop-in replacement for lm: robust_lm which conveniently allows for robust and clustered standard errors. Also includes other estimators commonly used in designed-based inference.

R package implementing the sensitivity analysis methods for unmeasured confounding proposed in Cinelli and Hazlett. This is the first approach I suggest to students interested in implementing a sensitivity analysis.

Implements a suite of estimation methods, bandwidth selection algorthims, and graphical tools for regression discontinuity designs.

Provides recent panel-data estimators that go beyond standard fixed effects models, including interactive fixed effects models and matrix completion methods.

Implements generalized diffence-in-differences estimators that avoid some of the recently identified problems with two-way fixed effect models.

##### F. Daniel Hidalgo
###### Associate Professor of Political Science

I’m a political science professor at MIT, specializing in Latin American politics.