Last updated on 2020-08-04 by Soren Hojsgaard

Wikipedia
defines a graphical model as follows: *A graphical model is a
probabilistic model for which a graph denotes the conditional
independence structure between random variables. They are commonly
used in probability theory, statistics - particularly Bayesian
statistics and machine learning.*

The packages can be roughly structured into the following topics (although several of them have functionalities which go across these categories):

**Representation, manipulation and display of graphs**

- diagram Visualises simple graphs (networks) based on a transition matrix, utilities to plot flow diagrams, visualising webs, electrical networks, ...
- DiagrammeR Create Graph Diagrams and Flowcharts Using R
- dynamicGraph Interactive graphical tool for manipulating graphs
- graph A package that implements some simple graph handling capabilities.
- gRbase The gRbase package provides certain general constructs which are used by other graphical modelling packages. This includes 1) the concept of gmData (graphical meta data), 2) several graph algorithms 3) facilities for table operations, 4) functions for testing for conditional independence. gRbase also illustrates how hierarchical log-linear models (hllm) may be implemented.
- igraph Routines for simple graphs, network analysis.
- network Tools to create and modify network objects. The network class can represent a range of relational data types, and supports arbitrary vertex/edge/graph attributes.
- qgraph Weighted network visualization and analysis, as well as Gaussian graphical model computation. See Epskamp et al. (2012) doi:10.18637/jss.v048.i04
- Rgraphviz Provides plotting capabilities for R graph objects.
- RBGL A fairly extensive and comprehensive interface to the graph algorithms contained in the BOOST library. (based on graph objects from the graph package).

**Classical models - General purpose packages**

- ggm Fitting graphical Gaussian models.
- gRbase The gRbase package provides certain general constructs which are used by other graphical modelling packages (in particular by gRain). This includes 1) the concept of gmData (graphical meta data), 2) several graph algorithms 3) facilities for table operations, 4) functions for testing for conditional independence. gRbase also illustrates how hierarchical log-linear models (hllm) may be implemented. Link: doi:10.18637/jss.v014.i17
- sna A range of tools for social network analysis, including node and graph-level indices, structural distance and covariance methods, structural equivalence detection, network regression, random graph generation, and 2D/3D network visualization.
- mgm Estimation of k-Order time-varying Mixed Graphical Models and mixed VAR(p) models via elastic-net regularized neighborhood regression.

**Miscellaneous: Model search, structure learning, specialized types of models etc.**

- BDgraph Bayesian Graph Selection Based on Birth-Death MCMC Approach. Bayesian inference for structure learning in undirected graphical models. The main target is to uncover complicated patterns in multivariate data wherein either continuous or discrete variables.
- bnclassify Learning Discrete Bayesian Network Classifiers from Data. State-of-the art algorithms for learning discrete Bayesian network classifiers from data, including a number of those described in Bielza and Larranaga (2014) with functions for prediction, model evaluation and inspection. The package implements a number of structure-learning algorithms, with both discriminative and generative network scores, and a number of naive Bayes-specific parameter estimation methods, such as the Model Averaged Naïve Bayes. Prediction with complete data is rather fast, allowing for discriminative scores for structure learning with moderately sized-data sets (e.g. the splice data set, with 61 variables and 3190 instances in ~100 seconds on my machine). There is a number of utility functionalities, such as cross-validation.
- bnstruct Bayesian Network Structure Learning from Data with Missing Values. Bayesian Network Structure Learning from Data with Missing Values. The package implements the Silander-Myllymaki complete search, the Max-Min Parents-and-Children, the Hill-Climbing, the Max-Min Hill-climbing heuristic searches, and the Structural Expectation-Maximization algorithm. Available scoring functions are BDeu, AIC, BIC. The package also implements methods for generating and using bootstrap samples, imputed data, inference.
- FBFsearch Algorithm for searching the space of Gaussian directed acyclic graphical models through moment fractional Bayes factors
- GeneNet Modeling and Inferring Gene Networks. GeneNet is a package for analyzing gene expression (time series) data with focus on the inference of gene networks.
- huge High-dimensional Undirected Graph Estimation.
- lvnetlvnet: Latent Variable Network Modeling. Estimate, fit and compare Structural Equation Models (SEM) and network models (Gaussian Graphical Models; GGM) using OpenMx. Allows for two possible generalizations to include GGMs in SEM: GGMs can be used between latent variables (latent network modeling; LNM) or between residuals (residual network modeling; RNM).
- ndtv Network Dynamic Temporal Visualizations. Renders dynamic network data from "networkDynamic" objects as animated movies or other representations of relational structure and node attributes that change over time.
- networkDynamic Dynamic Extensions for Network Objects. Simple interface routines to facilitate the handling of network objects with complex intertemporal data. "networkDynamic" is a part of the "statnet" suite of packages for network analysis.
- pcalg Standard and robust estimation of the skeleton (ugraph) and the equivalence class of a Directed Acyclic Graph (DAG) via the PC-Algorithm. The equivalence class is represented by its (unique) Completed Partially Directed Acyclic Graph (CPDAG).
- qp This package is deprecated and it is now only a stub for the newer version called qpgraph available through the Bioconductor project. The q-order partial correlation graph search algorithm, q-partial, or qp, algorithm for short, is a robust procedure for structure learning of undirected Gaussian graphical Markov models from "small n, large p" data, that is, multivariate normal data coming from a number of random variables p larger than the number of multidimensional data points n as in the case of, e.g., microarray data.
- qpgraph q-order partial correlation graphs, or qp-graphs for short, are undirected Gaussian graphical Markov models that represent q-order partial correlations. They are useful for learning undirected graphical Gaussian Markov models from data sets where the number of random variables p exceeds the available sample size n as, for instance, in the case of microarray data where they can be employed to reverse engineer a molecular regulatory network.
- SIN This package provides routines to perform SIN model selection as described in Drton and Perlman (2004). The selected models are represented in the format of the 'ggm' package, which allows in particular parameter estimation in the selected model.
- spectralGraphTopology The package provides estimators to learn k-component, bipartite, and k-component bipartite graphs from data by imposing spectral constraints on the eigenvalues and eigenvectors of the Laplacian and adjacency matrices. Those estimators leverages spectral properties of the graphical models as a prior information, which turn out to play key roles in unsupervised machine learning tasks such as community detection.

**Bayesian Networks/Probabilistic expert systems**

- bnlearn Bayesian network structure learning via constraint-based (also known as 'conditional independence') and score-based algorithms. This package implements the Grow-Shrink (GS) algorithm, the Incremental Association (IAMB) algorithm, the Interleaved-IAMB (Inter-IAMB) algorithm, the Fast-IAMB (Fast-IAMB) algorithm, the Max-Min Parents and Children (MMPC) algorithm and the Hill-Climbing (HC) greedy search algorithm for both discrete and Gaussian networks, along with many score functions and conditional independence tests. Some utility functions (model comparison and manipulation, random data generation, arc orientation testing) are also included.
- gRain A package for probability propagation in graphical independence networks, also known as probabilistic expert systems (which includes Bayesian networks as a special case). Link: doi:10.18637/jss.v046.i10
- RHugin The Hugin Decision Engine (HDE) is commercial software produced by HUGIN EXPERT A/S for building and making inference from Bayesian belief networks. The RHugin package provides a suite of functions allowing the HDE to be controlled from within the R environment for statistical computing. The RHugin package can thus be used to build Bayesian belief networks, enter and propagate evidence, and to retrieve beliefs. Additionally, the RHugin package can read and write hkb and NET files, making it easy to work simultaneously with both the RHugin package and the Hugin GUI. A licensed copy of the HDE (or the trial version) is required for the RHugin package to function, hence the target audience for the package is Hugin users who would like to take advantage of the statistical and programmatic capabilities of R. Notice: RHugin is NOT on CRAN. Link: http://rhugin.r-forge.r-project.org/
- sparsebn Fast methods for learning sparse Bayesian networks from high-dimensional data using coordinate descent and sparse regularization. Designed to handle mixed experimental and observational data with thousands of variables with either continuous or discrete observations.

**BUGS models**

- bayesmix Bayesian mixture models of univariate Gaussian distributions using JAGS.
- dclone Data Cloning and MCMC Tools for Maximum Likelihood Methods. Low level functions for implementing maximum likelihood estimating procedures for complex models using data cloning and Bayesian Markov chain Monte Carlo methods with support for JAGS, WinBUGS and OpenBUGS. Parallel MCMC computation is supported and can result in considerable speed-up.
- boa boa: Bayesian Output Analysis Program (BOA) for MCMC. A menu-driven program and library of functions for carrying out convergence diagnostics and statistical and graphical analysis of Markov chain Monte Carlo sampling output.
- BRugs BRugs: R interface to the OpenBUGS MCMC software. Fully-interactive R interface to the OpenBUGS software for Bayesian analysis using MCMC sampling. Runs natively and stably in 32-bit R under Windows. Versions running on Linux and on 64-bit R under Windows are in "beta" status and less efficient.
- coda coda: Output analysis and diagnostics for MCMC. Output analysis and diagnostics for Markov Chain Monte Carlo simulations.
- ergm ergm: Fit, Simulate and Diagnose Exponential-Family Models for Networks. An integrated set of tools to analyze and simulate networks based on exponential-family random graph models (ERGM). "ergm" is a part of the statnet suite of packages for network analysis.
- R2OpenBUGS R2OpenBUGS: Running OpenBUGS from R. Using this package, it is possible to call a BUGS model, summarize inferences and convergence in a table and graph, and save the simulations in arrays for easy access in R.
- R2WinBUGS Running WinBUGS and OpenBUGS from R / S-PLUS. Using this package, it is possible to call a BUGS model, summarize inferences and convergence in a table and graph, and save the simulations in arrays for easy access in R / S-PLUS. In S-PLUS, the openbugs functionality and the windows emulation functionality is not yet available.
- rjags rjags: Bayesian graphical models using MCMC. Interface to the JAGS MCMC library.

7 months ago by Marco Scutari

Bayesian Network Structure Learning, Parameter Learning and Inference

a year ago by Mihaljevic Bojan

Learning Discrete Bayesian Network Classifiers from Data

2 months ago by Alberto Franzin

Bayesian Network Structure Learning from Data with Missing Values

3 days ago by Reza Mohammadi

Bayesian Structure Learning in Graphical Models using Birth-Death MCMC

2 years ago by Peter Solymos

Data Cloning and MCMC Tools for Maximum Likelihood Methods

7 months ago by Karline Soetaert

Functions for Visualising Simple Graphs (Networks), Plotting Flow Diagrams

7 months ago by Pavel N. Krivitsky

Fit, Simulate and Diagnose Exponential-Family Models for Networks

4 years ago by Davide Altomare

Algorithm for Searching the Space of Gaussian Directed Acyclic Graph Models Through Moment Fractional Bayes Factors

3 months ago by Sacha Epskamp

Graph Plotting Methods, Psychometric Data Visualization and Graphical Model Estimation

7 years ago by Mathias Drton

A SINful Approach to Selection of Gaussian Graphical Markov Models

2 years ago by Ze Vinicius

Learning Graphs from Data via Spectral Constraints

8 months ago by Bryon Aragam

Learning Sparse Bayesian Networks from High-Dimensional Data