Bayesian Analysis of Graphical Models

Bayesian estimation and edge selection for graphical models of mixed binary, ordinal, and continuous variables. The variable types determine the model: an ordinal Markov random field for discrete data, a Gaussian graphical model for continuous data, or a mixed Markov random field combining both. Edge inclusion is determined through spike-and-slab priors, yielding posterior inclusion probabilities for each edge. Supports multi-group comparison via 'bgmCompare()', simulation, prediction, and missing data imputation.


bgms

CRANVersion Downloads Total Lifecycle:stable Codecov

Bayesian analysis of graphical models

The bgms package provides Bayesian estimation and edge selection for Markov random field models of mixed binary, ordinal, and continuous variables. The variable types in the data determine the model: an ordinal MRF for ordinal data, a Gaussian graphical model for continuous data, or a mixed MRF combining both. Posterior inference uses Markov chain Monte Carlo, combining a Metropolis approach for between-model moves (i.e., edge selection) with the No-U-Turn sampler for within-model parameter updates. The package supports both single-threaded and parallel chains, and uses a C++ backend for computational efficiency.

Main functions

  • bgm() — estimate a graphical model in a one-sample design.
  • bgmCompare() — compare graphical models between groups.

Both functions support edge selection via spike-and-slab priors, yielding posterior inclusion probabilities for each edge. bgm() can additionally model community structure, and bgmCompare() can test for group differences in individual parameters.

Installation

Install from CRAN:

install.packages("bgms")

Or install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("Bayesian-Graphical-Modelling-Lab/bgms@develop")

Citation

If you use bgms in your research, please cite the software package:

citation("bgms")
toBibtex(citation("bgms"))

Additional citation formats are available on the package website.

Contributing

Contributions are welcome. See CONTRIBUTING.md for how to get started.

Code of Conduct

This project follows the Contributor Covenant Code of Conduct.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("bgms")

0.2.0.0 by Maarten Marsman, 3 months ago


https://bayesian-graphical-modelling-lab.github.io/bgms/, https://github.com/Bayesian-Graphical-Modelling-Lab/bgms


Report a bug at https://github.com/Bayesian-Graphical-Modelling-Lab/bgms/issues


Browse source code at https://github.com/cran/bgms


Authors: Maarten Marsman [aut, cre] (ORCID: , Don van den Bergh [aut] (ORCID: , Nikola Sekulovski [ctb] (ORCID: , Giuseppe Arena [ctb] , Laura Groot [ctb] , Gali Geller [ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports Rcpp, RcppParallel, Rdpack, S7, methods, lifecycle, graphics, grDevices, parallel, stats, utils

Suggests coda, covr, knitr, MASS, qgraph, rmarkdown, testthat, withr

Linking to Rcpp, RcppArmadillo, RcppParallel, dqrng, BH


Imported by easybgm.


See at CRAN