Tools and Libraries for Causality

November 16, 2018

Here is a list of libraries, packages and tools for causal discovery and inference. Please let me know if I’ve missed out on something!

Python

Inference

  1. DoWhy: DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks. [GitHub]
  2. CausalInference: Causalinference is a software package that implements various statistical and econometric methods used in the field variously known as Causal Inference, Program Evaluation, or Treatment Effect Analysis. [GitHub] [PyPi]
  3. CausalImpact: This is the Python version of Google’s Causal Impact model. The main goal of the algorithm is to infer the expected effect a given intervention (or any action) had on some response variable by analyzing differences between expected and observed time series data. [GitHub]

Discovery

  1. CausalDiscoveryToolbox: This is a package for causal discovery, and includes algorithms from the popular R packages such as bnlean and pcalg. [GitHub]
  2. CGNN: This is not exactly a package, but its code to reproduce the results from the paper “Learning Functional Causal Models with Generative Neural Networks” [GitHub]
  3. BETS: This is a package to use Granger causality to learn causal networks with time series data. Although this package is targeted towards gene expression datasets, the method itself is fairly generic, and should work in cases where the number of samples is much lesser than the number of random variables. [GitHub]
  4. TiMINO: This is not a package, but the code to replicate the results from the paper. This is applicable for learning causal graphs from time series data. [Website]
  5. LiNGAM: This is a package to learn non-Gaussian linear causal models. It includes functionality for different variations of the LiNGAM algorithm, such as ICA based LiNGAM, Direct LiNGAM, VARMA-LiNGAM and LiNGAM for multiple groups. [GitHub]

R

Inference

  1. CausalImpact: This R package implements an approach to estimating the causal effect of a designed intervention on a time series. [GitHub]
  2. tmle: This package implements targeted maximum likelihood estimation of point treatment effects. [CRAN]
  3. InvariantCausalPrediction: This R package implements an approach for estimating confidence intervals for causal effects, using data collected in different experimental or environmental conditions. [CRAN]
  4. pcalg: This package provides functions for causal structure learning and causal inference using graphical models. Algorithms implemented are - the IDA algorithm, the Generalized Backdoor Criterion (GBC), the Generalized Adjustment Criterion (GAC) and some related functions. [CRAN]

Discovery

  1. pcalg: This package provides functions for causal structure learning and causal inference using graphical models. Algorithms implemented are PC, FCI, RFCI, GIES. [CRAN]
  2. CAM: This package fits a Causal Additive Model (CAM) for estimating the causal structure of the underlying process. [CRAN]
  3. VAR-LiNGAM: This is the R code for Vector Autoregressive Linear Non-Gaussian Acyclic Model. [Website]
  4. Bayes-LiNGAM: This is a software package for learning directed acyclic graph structures from non-experimental (‘uncontrolled’) data. [Website]

More code for causal discovery and inference is listed here and here.

Tools

  1. Tetrad: Tetrad is a program which creates, simulates data from, estimates, tests, predicts with, and searches for causal and statistical models. [Website]
  1. Website for LiNGAM [Website]
  2. Website with code from papers on causality [Website]
  3. Elias Barenboim’s group is beta-testing a tool for doing causal inference from first principles. You can apply to beta test the tool here. [Twitter]

(Updated 20th April, 2020)

Tools and Libraries for Causality - November 16, 2018 - Tanmayee Narendra