Learn R Programming

BDgraph

Overview

The R package BDgraph provides statistical tools for Bayesian structure learning for undirected graphical models with continuous, count, binary, and mixed data. The package is implemented the recent improvements in the Bayesian graphical models' literature, including Mohammadi and Wit (2015), Mohammadi et al. (2021), Mohammadi et al. (2017), and Dobra and Mohammadi (2018). Besides, the package contains several functions for simulation and visualization, as well as several multivariate datasets taken from the literature. To speed up the computations, the computationally intensive tasks of the package are implemented in C++ in parallel using OpenMP.

Installation

You can install the latest version from CRAN using:

install.packages( "BDgraph" )

Loading

library( BDgraph )

Simple Examples for BDgraph package

To see how to use the functionality of the package:

See also Mohammadi and Wit (2019).

Copy Link

Version

Install

install.packages('BDgraph')

Monthly Downloads

2,168

Version

2.73

License

GPL (>= 2)

Maintainer

Abdolreza Mohammadi

Last Published

August 23rd, 2024

Functions in BDgraph (2.73)

mse

Graph structure comparison
conf.mat

Confusion Matrix
geneExpression

Human gene expression dataset
covariance

Estimated covariance matrix
compare

Graph structure comparison
link2adj

Extract links from an adjacency matrix
Discrete Weibull

The Discrete Weibull Distribution (Type 1)
gnorm

Normalizing constant for G-Wishart
precision

Estimated precision matrix
plot.graph

Plot function for S3 class "graph"
conf.mat.plot

Plot Confusion Matrix
plot.bdgraph

Plot function for S3 class "bdgraph"
pgraph

Posterior probabilities of the graphs
plinks

Estimated posterior link probabilities
plotroc

ROC plot
posterior.predict

Posterior Predictive Samples
graph.sim

Graph simulation
summary.bdgraph

Summary function for S3 class "bdgraph"
predict.bdgraph

Predict function for S3 class "bdgraph"
rmvnorm

Generate data from the multivariate Normal distribution
roc

Build a ROC curve
sparsity

Compute the sparsity of a graph
reinis

Risk factors of coronary heart disease
print.sim

Print function for S3 class "sim"
print.bdgraph

Print function for S3 class "bdgraph"
plot.sim

Plot function for S3 class "sim"
rgwish

Sampling from G-Wishart distribution
surveyData

Labor force survey data
plotcoda

Convergence plot
select

Graph selection
rwish

Sampling from Wishart distribution
transfer

transfer for count data
traceplot

Trace plot of graph size
auc

Compute the area under the ROC curve
adj2link

Extract links from an adjacency matrix
bf

Bayes factor for two graphs
BDgraph-package

Bayesian Structure Learning in Graphical Models
bdgraph.npn

Nonparametric transfer
bdgraph.sim

Graph data simulation
bdw.reg

Bayesian estimation of (zero-inflated) Discrete Weibull regression
bdgraph.mpl

Search algorithm in graphical models using marginal pseudo-likehlihood
bdgraph

Search algorithm in graphical models
bdgraph.dw

Search algorithm for Gaussian copula graphical models for count data