CRAN Task View: Causal Inference

Maintainer:Imke Mayer, Pan Zhao, Noah Greifer, Nick Huntington-Klein, Julie Josse
Contact:imke.mayer at inria.fr
Version:2022-06-16
URL:https://CRAN.R-project.org/view=CausalInference
Source:https://github.com/cran-task-views/CausalInference/
Contributions:Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.
Citation:Imke Mayer, Pan Zhao, Noah Greifer, Nick Huntington-Klein, Julie Josse (2022). CRAN Task View: Causal Inference. Version 2022-06-16. URL https://CRAN.R-project.org/view=CausalInference.
Installation:The packages from this task view can be installed automatically using the ctv package. For example, ctv::install.views("CausalInference", coreOnly = TRUE) installs all the core packages or ctv::update.views("CausalInference") installs all packages that are not yet installed and up-to-date. See the CRAN Task View Initiative for more details.

Overview

Causal inference can be seen as a subfield of statistical analysis. It is used in various fields such as econometrics, epidemiology, educational sciences, etc. With causal inference one addresses questions about effects of a treatment, intervention, or policy on some target over a given sample or population. Under certain identifiability and model assumptions, causal inference can be carried out by fitting simple regression models or combining several regression models in a specific way as will be sketched out later. For observational data, additional untestable assumptions have to be made to (non-parametrically) identify causal effects.

There are no basic R functions that are direct implementations of standard causal inference designs, but many methods - more or less complex - are implemented in different packages on CRAN, which we structure into main topics:

Certain causal inference methods originated in specific fields such as econometrics or clinical trials and remain most popular therein. In certain cases, we therefore refer to other task views covering these methods in more depth. More generally, in this task view we focus on causal analyses with observational data.

If you think that we missed some important packages in this list, please contact the maintainers.

Methods for randomized controlled trial (RCT) and other experimental data

Average treatment effect estimation and other univariate treatment effect estimates

In addition, causalsens, OVtool, dstat, and EValue provide functions for sensitivity analyses (for unmeasured confounding, selection bias, measurement error), and ui implements functions to derive uncertainty intervals and conduct sensitivity analysis for missing data and unobserved confounding. cobalt and tableone generate balance tables and plots before and after covariate balancing, and confoundr implements covariate-balance diagnostics for time-varying confounding. WhatIf offers methods to assess overlap and extrapolation.

Heterogeneous treatment effect estimation

Some of the above mentioned packages can also be used for heterogeneous treatment effect (HTE) estimation.

Policy learning and dynamic treatment regimes

Structural equation models, do-calculus causal discovery

In addition, dagitty provides methods to define different types of graphical models (cpdags, pdag, ect.) and to identify adjustment sets (a web-based graphical environment is also available: DAGitty).

Specific types of data

Specific application fields

CRAN packages

Core:cobalt, dagitty, fixest, Matching, MatchIt, mediation, pcalg, PSweight, riskRegression, tmle, WeightIt.
Regular:AIPW, allestimates, alpaca, approxmatch, bacondecomp, bartCause, BCEE, bcf, BCHM, beanz, behaviorchange, bhm, blocksdesign, Boptbd, borrowr, bpbounds, BuyseTest, causaldata, causaleffect, CausalGAM, CausalGPS, CausalImpact, CausalMBSTS, causaloptim, CausalQueries, causalsens, causalweight, CBPS, cem, cfdecomp, cfma, CIEE, cit, cjoint, CKAT, clusteredinterference, cna, CompareCausalNetworks, confoundr, Counterfactual, ctmle, designmatch, did, DiPs, DirectEffects, dosearch, DoubleML, DRDID, drtmle, dstat, DTRlearn2, DTRreg, DynTxRegime, ebal, eefAnalytics, EffectLiteR, EffectTreat, endoSwitch, estimatr, evalITR, EValue, experiment, FindIt, FLAME, generalCorr, gfoRmula, gma, grf, gsynth, hdm, icsw, idem, inferference, interflex, InvariantCausalPrediction, ipcwswitch, ITRLearn, ITRSelect, ivmodel, ivmte, ivreg, LARF, ltmle, maic, maicChecks, marginaleffects, margins, match2C, matchMulti, MatchThem, medflex, MedSurvey, MendelianRandomization, microsynth, modelbased, mr.raps, MRPC, MultisiteMediation, mvGPS, netchain, nonlinearICP, optmatch, optweight, OTRselect, OVtool, PanelMatch, paths, plm, preference, qte, qtlnet, QTOCen, quantoptr, rcbalance, rcbsubset, rdrobust, regmedint, rpsftm, sampleSelection, sbw, seqDesign, simml, simsl, smartsizer, SortedEffects, SPORTSCausal, stdReg, stepp, stratamatch, subdetect, Synth, tableone, ThreeArmedTrials, tidysynth, tnet, tools4uplift, TrendInTrend, twang, twangContinuous, twangMediation, ui, WhatIf.
Archived:causaldrf, estudy2, iqLearn.

Related links

Other resources