Learn R Programming

⚠️There's a newer version (2.1.4) of this package.Take me there.

BiDAG (version 2.0.2)

Bayesian Inference for Directed Acyclic Graphs

Description

Implementation of a collection of MCMC methods for Bayesian structure learning of directed acyclic graphs (DAGs), both from continuous and discrete data. For efficient inference on larger DAGs, the space of DAGs is pruned according to the data. To filter the search space, the algorithm employs a hybrid approach, combining constraint-based learning with search and score. A reduced search space is initially defined on the basis of a skeleton obtained by means of the PC-algorithm, and then iteratively improved with search and score. Search and score is then performed following two approaches: Order MCMC, or Partition MCMC. The BGe score is implemented for continuous data and the BDe score is implemented for binary data or categorical data. The algorithms may provide the maximum a posteriori (MAP) graph or a sample (a collection of DAGs) from the posterior distribution given the data. All algorithms are also applicable for structure learning and sampling for dynamic Bayesian networks. References: J. Kuipers, P. Suter and G. Moffa (2018) , N. Friedman and D. Koller (2003) , D. Geiger and D. Heckerman (2002) , J. Kuipers and G. Moffa (2017) , M. Kalisch et al.(2012) .

Copy Link

Version

Install

install.packages('BiDAG')

Monthly Downloads

453

Version

2.0.2

License

GPL (>= 2)

Maintainer

Polina Suter

Last Published

April 30th, 2021

Functions in BiDAG (2.0.2)

DAGscore

Calculating the BGe/BDe score of a single DAG
Asia

Asia dataset
DBNscore

Calculating the BGe/BDe score of a single DBN
compact2full

Deriving an adjecency matrix of a full DBN
DBNdata

Simulated data set from a 2-step dynamic Bayesian network A synthetic dataset containing 100 observations generated from a random dynamic Bayesian network with 12 continuous dynamic nodes and 3 static nodes. The DBN includes observations from 5 time slices.
DBNunrolled

An unrolled adjacency matrix of a dynamic Bayesian network
Asiamat

Asiamat
getSubGraph

Deriving subgraph
Boston

Boston housing data
DBNmat

An adjacency matrix of a dynamic Bayesian network
graph2m

Deriving an adjacency matrix of a graph
orderMCMC

Structure learning with the order MCMC algorithm
compareDAGs

Comparing two graphs
orderMCMC class

orderMCMC class structure
gsimmat

An adjacency matrix of a simulated dataset
interactions

interactions dataset
kirp

kirp dataset
plot2in1

Highlighting similarities between two graphs
m2graph

Deriving a graph from an adjacancy matrix
plotDBN

Plotting a DBN
full2compact

Deriving a compact adjacency matrix of a DBN
edgep

Estimating posterior probabilities of single edges
partitionMCMC

DAG structure sampling with partition MCMC
kirc

kirc dataset
plotdiffs.DBN

Plotting difference between two DBNs
itercomp

Performance assessment of iterative MCMC scheme against a known Bayesian network
compareDBNs

Comparing two DBNs
scorespace class

scorespace class structure
string2mat

Deriving interactions matrix
plotdiffs

Plotting difference between two graphs
mapping

mapping dataset
samplecomp

Performance assessment of sampling algorithms against a known Bayesian network
connectedSubGraph

Deriving connected subgraph
modelp

Estimating a graph corresponding to a posterior probability threshold
scoreagainstDAG

Calculating the score of a sample against a DAG
gsim100

A simulated data set from a Gaussian continuous Bayesian network
gsim

A simulated data set from a Gaussian continuous Bayesian network
partitionMCMC class

partitionMCMC class structure
iterativeMCMC

Structure learning with an iterative order MCMC algorithm on an expanded search space
iterativeMCMC class

iterativeMCMC class structure
plotpcor

Comparing posterior probabilitites of single edges
scoreparameters

Initializing score object
plotpedges

Plotting posterior probabilities of single edges
scorespace

Prints 'scorespace' object