CRAN Task View: Causal Inference

Maintainer:Imke Mayer, Pan Zhao, Noah Greifer, Nick Huntington-Klein, Julie Josse
Contact:imke.mayer at inria.fr
Version:2023-08-04
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 (2023). CRAN Task View: Causal Inference. Version 2023-08-04. 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, sensemakr 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 (archived) 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 (SEM), 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, BCHM, behaviorchange, bhm, blocksdesign, bmem, Boptbd, borrowr, bpbounds, BuyseTest, causaldata, causaldrf, causaleffect, CausalGAM, CausalGPS, CausalImpact, CausalMBSTS, causaloptim, CausalQueries, causalsens, causalweight, CBPS, cem, cfdecomp, cfma, CIEE, cit, cjoint, CKAT, cna, CompareCausalNetworks, 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, hettx, icsw, idem, inferference, interflex, InvariantCausalPrediction, ipcwswitch, ivdesc, ivmodel, ivmte, ivreg, LARF, lmtp, ltmle, maic, maicChecks, marginaleffects, margins, matchMulti, MatchThem, medflex, MendelianRandomization, microsynth, modelbased, mr.raps, MRPC, MultisiteMediation, mvGPS, nonlinearICP, optmatch, optweight, OTRselect, OVtool, PanelMatch, paths, personalized, plm, preference, qte, qtlnet, QTOCen, quantoptr, rcbalance, rcbsubset, rdrobust, regmedint, rpsftm, sampleSelection, sbw, scpi, SEMID, sensemakr, seqDesign, simml, simsl, smartsizer, SortedEffects, SPORTSCausal, stdReg, stepp, stratamatch, subdetect, Synth, tableone, tidysynth, tnet, tools4uplift, TrendInTrend, twang, twangContinuous, twangMediation, ui, WhatIf.
Archived:clusteredinterference, confoundr, ITRLearn, ITRSelect, match2C, netchain, ThreeArmedTrials.

Related links

Other resources