Package: dmrfit
Date: 2026-10-07
Type: Package
Title: Scalable Bayesian Inference for Discrete Markov Random Fields
Version: 0.1.0
Authors@R: c(person(given = "Giuseppe",
             family = "Arena",
             role = c("aut", "cre"),
             email = "g.arena@uva.nl",
             comment = c(ORCID = "0000-0001-5204-3326")))
Description: 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.
License: MIT + file LICENSE
Copyright: The dataset 'rads2' is licensed under CC BY 4.0; see file
        COPYRIGHTS.
URL: https://jupepis.github.io/dmrfit/,
        https://github.com/jupepis/dmrfit
BugReports: https://github.com/jupepis/dmrfit/issues
Depends: R (>= 4.0.0)
Imports: ggplot2, grDevices, graphics, parallel, Rcpp (>= 1.1.0), stats
Suggests: igraph, knitr, rmarkdown, tinytest
VignetteBuilder: knitr
LinkingTo: Rcpp, RcppArmadillo, RcppProgress
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.3
NeedsCompilation: yes
Packaged: 2026-10-07 21:10:23 UTC; giuseppearena
Author: Giuseppe Arena [aut, cre] (ORCID:
    <https://orcid.org/0000-0001-5204-3326>)
Maintainer: Giuseppe Arena <g.arena@uva.nl>
Repository: CRAN
Date/Publication: 2026-10-18 15:10:02 UTC
Built: R 4.6.1; aarch64-apple-darwin23; 2026-10-18 15:58:13 UTC; unix
Archs: dmrfit.so.dSYM
