causaloptim: An Interface to Specify Causal Graphs and Compute Bounds on Causal Effects

When causal quantities are not identifiable from the observed data, it still may be possible to bound these quantities using the observed data. We outline a class of problems for which the derivation of tight bounds is always a linear programming problem and can therefore, at least theoretically, be solved using a symbolic linear optimizer. We extend and generalize the approach of Balke and Pearl (1994) <doi:10.1016/B978-1-55860-332-5.50011-0> and we provide a user friendly graphical interface for setting up such problems via directed acyclic graphs (DAG), which only allow for problems within this class to be depicted. The user can then define linear constraints to further refine their assumptions to meet their specific problem, and then specify a causal query using a text interface. The program converts this user defined DAG, query, and constraints, and returns tight bounds. The bounds can be converted to R functions to evaluate them for specific datasets, and to latex code for publication. The methods and proofs of tightness and validity of the bounds are described in a preprint by Sachs, Gabriel, and Sjölander (2020) <>.

Version: 0.8.2
Depends: R (≥ 3.5.0), igraph
Imports: methods, Rcpp (≥ 1.0.1), shiny, rcdd
LinkingTo: Rcpp
Suggests: knitr, rmarkdown
Published: 2021-06-09
Author: Michael C Sachs [aut, cre], Erin E Gabriel [aut], Arvid Sjölander [aut], Gustav Jonzon [ctb] ((improved vertex enumeration)), Alexander A Balke [ctb] ((C++ code)), Colorado Reed [ctb] ((graph-creator.js))
Maintainer: Michael C Sachs <sachsmc at>
License: MIT + file LICENSE
NeedsCompilation: yes
Citation: causaloptim citation info
Materials: README NEWS
CRAN checks: causaloptim results


Reference manual: causaloptim.pdf
Vignettes: Symbolic Computation of Tight Causal Bounds
Code from examples in manuscript
How to use the causaloptim Shiny app to analyze graphs
Improving the speed of computing causal bounds
Package source: causaloptim_0.8.2.tar.gz
Windows binaries: r-devel:, r-devel-UCRT:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): causaloptim_0.8.2.tgz, r-release (x86_64): causaloptim_0.8.2.tgz, r-oldrel: causaloptim_0.8.2.tgz
Old sources: causaloptim archive


Please use the canonical form to link to this page.