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 (2023). CRAN Task View: Graphical Models. Version 2023-04-05. 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.

Notice that Structural Equation Models (SEM) packages are in a sense also graphical models. However, SEM packages are not presented here but are they have their own section in the Psychometrics task view.

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:abn, backbone, bayesmix, BDgraph, bnclassify, bnlearn, bnstruct, boa, BRugs, coda, dclone, deal, diagram, DiagrammeR, ergm, FBFsearch, GeneNet, ggm, gRain, gRc, gRim, huge, igraph, lvnet, mgm, MXM, ndtv, network, networkDynamic, pcalg, pchc, qgraph, R2OpenBUGS, R2WinBUGS, rjags, SEMID, sna, spectralGraphTopology.

Related links

Other resources