CRAN status

CausalQueries is a package that lets you declare binary causal models, update beliefs about causal types given data and calculate arbitrary estimands. Model definition makes use of dagitty functionality. Updating is implemented in stan.


To install the latest stable release of CausalQueries:


To install the latest development release :


Causal models

Causal models are defined by:

A wrinkle:


Our goal is to form beliefs over parameters but also over more substantive estimands:

Credits etc

The approach used in CausalQueries is a generalization of the biqq models described in “Mixing Methods: A Bayesian Approach” (Humphreys and Jacobs, 2015). The conceptual extension makes use of work on probabilistic causal models described in Pearl’s Causality (Pearl, 2009). The approach to generating a generic stan function that can take data from arbitrary models was developed in key contributions by Jasper Cooper and Georgiy Syunyaev. Lily Medina did the magical work of pulling it all together and developing approaches to characterizing confounding and defining estimands. Julio Solis has done wonders to simplify the specification of priors.