CRAN Task View: Graphical Models

Maintainer:Soren Hojsgaard
Contact:sorenh at
Contributions:Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.
Citation:Soren Hojsgaard (2021). CRAN Task View: Graphical Models. Version 2021-12-27. URL
Installation:The packages from this task view can be installed automatically using the ctv package. For example, ctv::install.views("GraphicalModels", coreOnly = TRUE) installs all the core packages or ctv::update.views("GraphicalModels") installs all packages that are not yet installed and up-to-date. See the CRAN Task View Initiative for more details.

Wikipedia says:

A graphical model or probabilistic graphical model (PGM) or structured probabilistic model is a probabilistic model for which a graph expresses the conditional dependence structure between random variables. They are commonly used in probability theory, statistics — particularly Bayesian statistics — and machine learning.

A supplementary view is that graphical models are based on exploiting conditional independencies for constructing complex stochastic models with a modular structure. That is, a complex stochastic model is built up by simpler building blocks.

This task view is a collection of packages intended to supply R code to deal with graphical models.

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

Classical models - General purpose packages

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

Bayesian Networks/Probabilistic expert systems

BUGS models

CRAN packages

Regular:bayesmix, BDgraph, bnclassify, bnlearn, bnstruct, boa, BRugs, coda, dclone, diagram, DiagrammeR, ergm, FBFsearch, GeneNet, ggm, gRain, huge, igraph, lvnet, mgm, network, networkDynamic, pcalg, qgraph, R2OpenBUGS, R2WinBUGS, rjags, SIN, sna, spectralGraphTopology.

Related links

Other resources