dmrfit: Scalable Bayesian Inference for Discrete Markov Random Fields

Estimation of discrete Markov random fields through the pseudo-likelihood, for both Ising models (Ising (1925) <doi:10.1007/BF02980577>) and ordinal Markov random fields (Marsman et al. (2025) <doi:10.1017/psy.2024.4>). Point estimates, either maximum pseudo-likelihood or maximum a posteriori, are obtained through a trust region optimization algorithm, with robust standard errors from the Godambe-Huber-White (GHW, or sandwich) estimator, for both full and constrained network structures. Bayesian inference corrects the pseudo-posterior through coordinate rescaling (Arena and Marsman (2026) <doi:10.48550/arXiv.2601.17205>), which matches its covariance to the GHW covariance, and samples from it with the Fisher adaptive Metropolis-adjusted Langevin algorithm (Titsias (2024) <doi:10.48550/arXiv.2305.14442>). For comparison, the posterior based on the full likelihood can also be sampled, exactly for small networks or with the double Metropolis-Hastings algorithm (Liang (2010) <doi:10.1080/00949650902882162>). Savage-Dickey Bayes factors test each pairwise interaction, computed either by sampling importance resampling (Skare et al. (2003) <doi:10.1111/1467-9469.00360>) or from the posterior draws.

Version: 0.1.0
Depends: R (≥ 4.0.0)
Imports: ggplot2, grDevices, graphics, parallel, Rcpp (≥ 1.1.0), stats
LinkingTo: Rcpp, RcppArmadillo, RcppProgress
Suggests: igraph, knitr, rmarkdown, tinytest
Published: 2026-10-18
DOI: 10.32614/CRAN.package.dmrfit (may not be active yet)
Author: Giuseppe Arena ORCID iD [aut, cre]
Maintainer: Giuseppe Arena <g.arena at uva.nl>
BugReports: https://github.com/jupepis/dmrfit/issues
License: MIT + file LICENSE
Copyright: The dataset 'rads2' is licensed under CC BY 4.0; see file COPYRIGHTS.
dmrfit copyright details
URL: https://jupepis.github.io/dmrfit/, https://github.com/jupepis/dmrfit
NeedsCompilation: yes
CRAN checks: dmrfit results

Documentation:

Reference manual: dmrfit.html , dmrfit.pdf
Vignettes: Analyzing a psychological network with dmrfit (source)

Downloads:

Package source: dmrfit_0.1.0.tar.gz
Windows binaries: r-devel: dmrfit_0.1.0.zip, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): dmrfit_0.1.0.tgz, r-oldrel (arm64): dmrfit_0.1.0.tgz, r-release (x86_64): dmrfit_0.1.0.tgz, r-oldrel (x86_64): dmrfit_0.1.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=dmrfit to link to this page.