CausalQueries

CRAN status DOI

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

Installation

To install the latest stable release of CausalQueries:

install.packages("CausalQueries")

To install the latest development release :

install.packages("devtools")
devtools::install_github("integrated-inferences/CausalQueries")

Helping Out & Contributing

CausalQueries is an open and active developer community. We welcome contributions and are excited you are keen to get involved. Please refer to CONTRIBUTING.md to get started.

Causal Models

Causal models are defined by:

A wrinkle:

Inference

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

Credits etc

The approach used in CausalQueries is developed in Humphreys and Jacobs 2023 drawing on work on probabilistic causal models described in Pearl’s Causality (Pearl, 2009). We thank Ben Goodrich who provided generous insights on using stan for this project. We thank Alan M Jacobs for key work developing the framework underlying the package. Our thanks to Jasper Cooper for contributions generating a generic function to create Stan code, to Clara Bicalho who helped figure out the syntax for causal statements, to Julio S. Solís Arce who made many key contributions figuring out how to simplify the specification of priors, and to Merlin Heidemanns who figured out the rstantools integration and made myriad code improvements.