-
⌥ 3 steps Index: 132 89 peers Did someone manipulate the cutoff? (rddensity)
The standard manipulation test for RD designs — checks whether the running variable's density jumps at the cutoff (a sign units sorted around it).
Data prep Take the running variable▼Diagnostic / pre-tests Run the manipulation test▼Reporting Plot the two densities -
⌥ 2 steps Index: 132 83 peers Is your counterfactual an extrapolation? (WhatIf)
Flags when a counterfactual question is a safe interpolation versus a model-dependent extrapolation far from your data.
Data prep Load data and define the counterfactual▼Diagnostic / pre-tests Run the convex-hull / distance test -
⌥ 5 steps Index: 132 35 peers Entropy balancing for covariate overlap (ebal)
Reweight controls to exactly match the treated group's covariate moments, achieving balance without iterative propensity-score tweaking.
Data prep Assemble treatment indicator and covariat…▼Estimation Run entropy balancing▼Diagnostic / pre-tests Check exact moment balance▼Estimation Weighted ATT estimate▼Reporting Love plot of standardized differences -
⌥ 4 steps Index: 132 98 peers Bias-corrected nearest-neighbor matching (Matching)
Match treated and control units on covariates, then bias-correct and get the correct large-sample standard errors.
Data prep Fit the propensity score model▼Estimation Bias-adjusted nearest-neighbor matching▼Diagnostic / pre-tests Check covariate balance after matching▼Inference Report the ATT with Abadie-Imbens SE -
⌥ 5 steps Index: 132 48 peers Regression discontinuity, done right (rdrobust)
Estimate causal effects at a cutoff with data-driven optimal bandwidths and bias-corrected, robust confidence intervals.
Data prep Load senate data and inspect the running …▼Diagnostic / pre-tests RD plot around the cutoff▼Diagnostic / pre-tests Data-driven optimal bandwidth▼Estimation Robust bias-corrected RD estimate▼Inference Read the three inference rows -
⌥ 4 steps Index: 132 23 peers Quantitative Social Science: data and code (qss)
The companion R package for Imai's textbook Quantitative Social Science, bundling every dataset and chapter vignette for hands-on data-analysis teaching.
Data prep Install and load qss▼Diagnostic / pre-tests Cross-tabulate callbacks by race▼Estimation Difference-in-means in callback rates▼Reporting Interpret the effect -
⌥ 4 steps Index: 132 83 peers Analyzing list / item-count experiments (list)
Multivariate regression for list (item-count) experiments, recovering the prevalence and predictors of a sensitive attitude without asking about it directly.
Data prep Load the list package and race data▼Diagnostic / pre-tests Difference-in-means prevalence▼Estimation Multivariate ML regression▼Reporting Predict sensitive-item prevalence -
⌥ 5 steps Index: 132 106 peers Matching for panel / time-series cross-sectional data (PanelMatch)
Matches treated unit-periods to controls with identical recent treatment histories, then applies a difference-in-differences estimator for TSCS data.
Diagnostic / pre-tests Inspect treatment distribution▼Estimation Build matched sets▼Diagnostic / pre-tests Check covariate balance▼Estimation Estimate the ATT (DiD)▼Reporting Summarize and plot leads -
⌥ 5 steps Index: 132 28 peers Coarsened exact matching (CEM)
Temporarily coarsens each covariate into bins, exact-matches treated and controls within bins, then estimates effects on the matched data.
Data prep Load cem and the LeLonde data▼Diagnostic / pre-tests Measure imbalance before matching▼Estimation Coarsen and match with cem()▼Diagnostic / pre-tests Check imbalance after matching▼Inference Estimate the SATT -
⌥ 5 steps Index: 132 53 peers Multiple imputation of missing data (Amelia)
Fills in missing values via fast bootstrap-EM multiple imputation, producing several complete datasets you analyze and combine.
Data prep Load Amelia and the freetrade data▼Estimation Run multiple imputation with m = 5▼Diagnostic / pre-tests Check imputation diagnostics▼Estimation Fit the model on each imputed dataset▼Inference Combine estimates with Rubin's rules -
⌥ 4 steps Index: 132 27 peers Propensity-score weighting (PSweight)
A full design-and-analysis platform for causal effects via balancing weights (overlap, IPW, ATT, matching, entropy) for binary and multiple treatments.
Data prep Load data and specify the PS model▼Diagnostic / pre-tests Design stage: SumStat() balance check▼Estimation Estimate the ATO with overlap weights▼Inference Summarize pairwise contrasts -
⌥ 5 steps ⑂ 1 branch Index: 60 32 peers An observational ATE you can defend (balance → estimate → sensitivity)
My checklist for an observational effect: match, prove balance with cobalt, estimate on the matched sample, then quantify hidden-confounding risk with sensemakr.
Data prep Treatment, covariates, outcome Data prep matchit() — nearest-neighbour matching Diagnostic / pre-tests bal.tab() / love.plot() — cobalt Estimation Estimate the ATT on matched data Reporting sensemakr() — robustness value + contours -
⌥ 4 steps ⑂ 1 branch Index: 195 52 peers Draw the DAG, find the adjustment set (ggdag & dagitty)
Before any estimation: encode your assumptions as a causal graph, enumerate the backdoor paths from treatment to outcome, and let the graph hand you the minimal set of covariates to adjust for.
Data prep Encode your assumptions as a DAG Diagnostic / pre-tests Enumerate paths; spot backdoors & collide… Estimation Minimal sufficient adjustment set Robustness check Test the DAG's implications -
⌥ 4 steps ⑂ 1 branch Index: 207 86 peers Mendelian randomization: genes as instruments for a causal effect (TwoSampleMR)
Use genetic variants as instruments to estimate the causal effect of an exposure on an outcome from GWAS summary data — with IVW plus pleiotropy-robust MR-Egger and weighted-median checks.
Data prep Harmonise SNP–exposure & SNP–outcome effe… Diagnostic / pre-tests Check instrument strength Estimation Inverse-variance weighted estimate Robustness check Pleiotropy-robust: MR-Egger, weighted med… -
⌥ 4 steps ⑂ 1 branch Index: 170 65 peers Goodman-Bacon decomposition: what your TWFE estimate is averaging (bacondecomp)
A two-way fixed-effects DiD is a weighted average of all possible 2×2 comparisons — including 'forbidden' ones that use already-treated units as controls. This shows you the weights.
Data prep A staggered-adoption panel Diagnostic / pre-tests Decompose into 2×2 comparisons Robustness check Spot the forbidden comparisons Reporting Read β as a weighted average -
⌥ 4 steps ⑂ 1 branch Index: 207 12 peers Honest sensitivity bounds for parallel-trends violations (HonestDiD)
Stop betting everything on a pre-trends test. Allow the post-treatment trend to deviate within a transparent class, and report the confidence set — and the breakdown value where the effect would vanish.
Data prep Start from event-study coefficients Diagnostic / pre-tests Read the pre-trends, don't just test them Robustness check Bound the deviation: relative magnitudes … Inference Robust confidence set & breakdown value -
⌥ 4 steps ⑂ 1 branch Index: 219 104 peers Model, identify, estimate, refute — the DoWhy four-step recipe (DoWhy)
Make your assumptions explicit: draw a causal graph, identify the estimand by the backdoor criterion, estimate it, then actively try to refute it with placebo and confounding tests.
Data prep Model — encode the causal graph Diagnostic / pre-tests Identify — apply the backdoor criterion Estimation Estimate — adjust for the backdoor set Robustness check Refute — placebo & unobserved-confounder … -
⌥ 4 steps ⑂ 1 branch Index: 108 33 peers Sharp regression discontinuity with robust bias correction (rdrobust)
Identify the effect at a cutoff: a local-polynomial RD with an MSE-optimal bandwidth and robust, bias-corrected confidence intervals.
Data prep Running variable, cutoff, outcome Diagnostic / pre-tests rdplot — see the jump Estimation Local-linear RD with bias correction Robustness check Bandwidth & donut sensitivity -
⌥ 4 steps ⑂ 1 branch Index: 96 64 peers Instrumental variables & 2SLS for an endogenous treatment (ivreg)
When treatment is endogenous, an instrument identifies the complier (LATE) effect via two-stage least squares — after you check the instrument is strong.
Data prep Outcome, endogenous treatment, instrument Diagnostic / pre-tests Check instrument strength (first stage) Estimation Two-stage least squares (ivreg) Inference Interpret as a complier effect (LATE) -
⌥ 4 steps ⑂ 1 branch Index: 108 69 peers Design & diagnose a randomized experiment (DeclareDesign)
Specify a study as model–inquiry–data–answer, simulate it, and read its diagnosands — bias, power, coverage — before you run it.
Data prep Declare the model & potential outcomes Estimation Difference-in-means estimator Inference Neyman variance & confidence intervals Diagnostic / pre-tests Diagnose: bias, power, coverage -
⌥ 4 steps Index: 207 45 peers Matching for causal inference (MatchIt)
Preprocess by matching so groups are comparable, check balance, then estimate the effect on the matched sample — design before analysis.
Data prep Treatment W + covariates X▼▼Diagnostic / pre-tests Assess balance (summary / plot)▼Reporting Estimate the effect on matched data -
⌥ 4 steps Index: 171 107 peers Covariate balance for matching & weighting (cobalt)
Before you trust an observational estimate, prove balance: SMDs, overlap, and a Love plot before vs after adjustment.
Data prep Treatment W + covariates X▼Data prep Estimate weights / matches (WeightIt / Ma…▼▼Reporting love.plot() -
⌥ 5 steps ⑂ 1 branch Index: 108 87 peers Smooth signals with a local linear forest
When the conditional mean is smooth: regression forest baseline → ll_regression_forest → tuning → diagnostics.
▼Diagnostic / pre-tests Tune λ via cross-validation▼Diagnostic / pre-tests Calibration & boundary plot▼Reporting Side-by-side comparison -
⌥ 6 steps ⑂ 1 branch Index: 132 42 peers Evaluating a causal forest fit
Did the forest actually capture treatment-effect heterogeneity? Calibration → variable importance → BLP → omnibus tests.
▼Diagnostic / pre-tests test_calibration() Diagnostic / pre-tests variable_importance() Heterogeneity best_linear_projection() Diagnostic / pre-tests OOB residual checks▼Reporting Fit-evaluation report -
⌥ 5 steps ⑂ 1 branch Index: 170 30 peers Causal forest with time-to-event data (survival)
Censoring check → causal survival forest → RMST-scale AIPW ATE → calibration → report.
▼▼Inference [GRF] AIPW average treatment effect Diagnostic / pre-tests test_calibration()▼Reporting RMST difference by subgroup -
⌥ 8 steps ⑂ 1 branch Index: 292 48 peers Heterogeneous treatment effects with a causal forest (GRF recipe)
The full GRF HTE playbook: cross-fit nuisances → causal forest → calibration → AIPW ATE → BLP → RATE → policy.
▼▼Diagnostic / pre-tests test_calibration() Inference [GRF] AIPW average treatment effect Heterogeneity best_linear_projection() Heterogeneity [GRF] Rank-weighted ATE — RATE / AUTOC / …▼Robustness check Policy learning (policytree)▼Reporting CATE histogram + targeting report