Causal Methods
REFERENCE

Key packages

R and Python packages indexed by method. Each entry lists the key functions, install command, and a link to the documentation.

DID & EVENT STUDIES
fixestFast fixed-effects estimators for OLS, Poisson, and logit. The go-to package for TWFE and event studies. Supports multiway clustering and high-dimensional FEs.
docs →
feols()fepois()iplot()coefplot()
didCallaway–Sant'Anna staggered DiD. Computes group-time ATTs and aggregates by cohort, calendar time, or event time. Robust to treatment effect heterogeneity.
docs →
att_gt()aggte()ggdid()
staggeredSun–Abraham estimator and Callaway–Sant'Anna as a one-liner. Designed for simple, fast staggered DiD with minimal setup.
docs →
staggered()staggered_cs()
bacondecompGoodman-Bacon decomposition of the TWFE estimator into 2×2 DiD components. Reveals which comparisons drive the overall estimate.
docs →
bacon()
INSTRUMENTAL VARIABLES
fixestIV via the | syntax in feols(). Supports multiple instruments, clustered SEs, and weak-instrument diagnostics in the same workflow as TWFE.
docs →
feols(y ~ x | fe | d ~ z)fitstat()
ivreg2SLS, LIML, and GMM estimators. Includes Anderson-Rubin confidence sets valid under weak instruments. From the AER package ecosystem.
docs →
ivreg()summary(., diagnostics=TRUE)
ivmodelComprehensive weak-instrument robust inference: Anderson-Rubin, Conditional Likelihood Ratio (CLR), and LIML. Reports all weak-IV tests in one call.
docs →
ivmodel()AR.test()CLR()
REGRESSION DISCONTINUITY
rdrobustLocal polynomial RDD with MSE-optimal and CER-optimal bandwidth selection. Handles sharp and fuzzy designs. Confidence intervals with robust bias correction.
docs →
rdrobust()rdbwselect()rdplot()
rddensityMcCrary (2008) and Cattaneo–Jansson–Ma density test for manipulation of the running variable. Essential validity check for every RDD.
docs →
rddensity()rdplotdensity()
rdlocrandLocal randomization approach to RDD. Treats units near the cutoff as if randomly assigned. Useful when local polynomial assumptions are implausible.
docs →
rdrandinf()rdsensitivity()
MATCHING & IPW
MatchItPropensity score and covariate matching with all major algorithms: nearest neighbor, optimal, full, genetic, CEM. Integrates with cobalt for balance checks.
docs →
matchit()match.data()summary()
WeightItIPW, entropy balancing, CBPS, and energy balancing. Targets ATE, ATT, or ATO. Integrates with marginaleffects for outcome modeling.
docs →
weightit()summary()bal.tab()
cobaltBalance assessment for any matched or weighted dataset. Reports standardized mean differences, variance ratios, and love plots.
docs →
bal.tab()love.plot()bal.plot()
sensemakrSensitivity analysis for linear models (Cinelli & Hazlett 2020). Quantifies how strong an unobserved confounder must be to explain away the result.
docs →
sensemakr()ovb_bounds()plot()
SYNTHETIC CONTROL
SynthOriginal Abadie, Diamond & Hainmueller (2010) synthetic control. Minimizes pre-treatment MSPE over donor weights. Includes placebo inference.
docs →
synth()synth.tab()path.plot()
tidysynthTidy interface to synthetic control with ggplot2-compatible output and built-in in-space placebo tests. Recommended for modern R workflows.
docs →
synthetic_control()grab_significance()plot_trends()
augsynthAugmented synthetic control (Ben-Michael, Feller & Rothstein 2021). Adds a bias-correction term when pre-treatment fit is imperfect.
docs →
augsynth()summary()plot()
CAUSAL ML
grfGeneralized random forests. Honest causal forest with valid CATEs and confidence intervals. Also provides instrumental, quantile, and survival forests.
docs →
causal_forest()average_treatment_effect()test_calibration()rank_average_treatment_effect()
DoubleMLDouble ML for ATE and CATE. PLR, IRM, PLIV, and IIVM models. Cross-fitting with any mlr3 learner. Confidence intervals via multiplier bootstrap.
docs →
DoubleMLPLR$new()DoubleMLIRM$new()$fit()$summary()
rlearnerR-learner and X-learner implementations using cross-fitting. R-learner is Neyman-orthogonal for CATE estimation under CIA.
docs →
rlasso_te()xgboost_te()
rboundsRosenbaum sensitivity bounds for matched observational studies. Reports the gamma value at which inference breaks down.
docs →
psens()hlsens()