Skip to contents

This converts a DAG to it's partition by iteratively constructing sets of outpoints. This is further explained in section 4.1 of Kuipers & Moffa (2017).

Usage

DAGtoPartition(dag)

Arguments

dag

A directed acyclic graph represented as an adjacency matrix, igraph, or bnlearn object.

Value

Labelled partition for the given adjacency matrix.

References

Kuipers, J., & Moffa, G. (2017). Partition MCMC for inference on acyclic digraphs. Journal of the American Statistical Association, 112(517), 282-299.

Examples

dag <- UniformlySampleDAG(LETTERS[1:3])
partitioned_nodes <- DAGtoPartition(dag)