Skip to contents

This package is for performing causal structure learning and inference assuming the causal process follows a directed acyclic graph (DAG). It includes functionality to learn the structure using partition MCMC along with building Bayesian networks and performing probabilistic queries (using gRain).

The bulk of this package is an implementation of partition Markov Chain Monte Carlo (PMCMC) algorithm in R. Our PMCMC is similar to the BiDAG implementation but the scoring function defaults to using bnlearn which allows for a range of scoring assumptions and priors for pairwise edge probabilities. There is also more exposure of the sampling procedure itself, whereby the algorithm can return both partitions and DAGs while providing convergence diagnostics to understand how well the algorithm is sampling in both partition and DAG space.

We provide a simple example and function documentation.

Installation

Install the released version of cia from CRAN:

Or, install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("SpaceOdyssey/cia")