Bayesian Analysis of Graphical Models
- CRAN checks, method
Method
Checks and health
CRAN runs every current package through
R CMD checkon a set of machines and publishes a result for each one. The health shown on a package page comes from these results alone.- Problems
- Notes alone never count against a package, but a warning, an error or a failure on any platform is a problem. Open CRAN deadlines are a fact of their own, shown as a clock after the mark, so the mark always says what the checks found.
- Checks only
- Health reflects CRAN's check results and nothing else. Even a package with no tests, no coverage or no recent release can have every platform OK.
- Once a day
- Results are collected once a day from files CRAN publishes. Each platform is one machine set-up, named by its R version, operating system, architecture and compiler, such as r-devel-linux-x86_64-fedora-clang.
- Platforms counted
- The 13 in 3 of 13 is the number of platform rows CRAN published for that package on the day of collection. The set of machines changes over time, so the number is not fixed, and a package missing from a platform counts as neither passing nor failing there.
- All OK13 platforms
- CRAN 30-day downloads, method
- 690+3.8% up on the 30 days before, the better direction
- Dependent packages, method
Method
Reverse dependencies
Dependent packages are other packages that list this one under
Depends,ImportsorLinkingToin theirDESCRIPTIONfile. Those fields list the packages a package needs to install, so dependents break if this one is archived or broken.- As declared
- The counts follow the declarations as written, not whether a package uses the other one when it runs.
- Suggests apart
- Packages that list this one only under
Suggestsinstall and run without it, and use it for tests, examples or an optional feature. They are counted as Suggested by, never among the dependents, and a package that also lists it under one of the three fields is a dependent and is not counted again. - Zero
- Zero dependents means no current CRAN package declares a need for this one, though some may suggest it. On 28 Oct 2026, 19,572 of the 25,583 current CRAN packages had no dependent package.
- 1none suggest it
- Test coverage, method
Method
Test coverage
Test coverage is measured by downloading each CRAN package's current source file, installing its dependencies, building it and running its tests under covr.
- Almost half of CRAN has no tests to run
- Only CRAN packages are measured. Many have no percentage, most often because the package has no tests, and that blank is a recorded outcome, not missing data.
- NOT_CRAN
- Tests run with NOT_CRAN=true, so tests that skip themselves on CRAN run here, and the figure can differ from what CRAN's own checks see.
- Current version only
- Only the current version is measured, and a new version on CRAN is measured again. Older rows are kept but never filled in later. This is one package's run.
- Never 0%
- On a package page three states stay apart: measured, no tests, and not measured. Neither of the last two is ever shown as 0%.
- Not measuredthe run failed
- Advisories, method
Method
Security advisories
Advisories come from the R Consortium advisory database, a community record of security problems in R packages, as OSV publishes it.
- The copy
- The record is read once a day. The data is published under the Apache License 2.0 and is credited on the advisories list.
- Box under the name
- Under the package's name, a box names any advisory that affects the current release, with its fix or that there is none.
- Ranges
- Advisories state ranges, such as from 0.9.12 up to but not including 1.8.8. Each range is checked against every version CRAN has published, using the version rules R itself uses, so a release that came out after the advisory was written is still caught by its range.
- Not the package
- The rating is for the library flaw itself, not for how exposed the R package is, and it is never added up into a figure for the package.
- None known
About
Method, About Method Licence figures come from the Licences
License field of each package's DESCRIPTION file, read the way R itself reads it. No licence file is opened.tools::analyze_license() and R's own licence database, as CRAN's checks read it.| is read, so one string can offer two families.
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.
Full description
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.
- Maintainer
- Maarten Marsman
- Licence
- GPL (>= 2)
- Latest release
- 4 Aug 2026
- First release
- 21 Apr 2023
More details
- Releases
- 13
- Needs compilation
- Yes
- Needs R
- >= 3.5
- Config/testthat/edition
- 3
- Date
- 2026-08-03
- LazyData
- true
- RdMacros
- Rdpack
- RoxygenNote
- 8.0.0
Task views (2)
Subjects (2) Method, SubjectsMethod
Subjects and collections
Subjects are the site's own grouping of CRAN packages, found by clustering. Collections are sets of packages that communities declare, such as the tidyverse.
- Subjects
- Subjects are found by clustering the words of current CRAN packages and the packages they use. No one edits them by hand.
- Collections
- Collections are sets that communities declare, through a package that installs the set or an organization on GitHub. The site finds them by rules.
- Who made each
- Subjects are marked Site and collections Community. Subjects, collections and task views are never mixed in one list.
- The day of the data
- Subjects and collections were last worked out on 22 Oct 2026.
Cite
Package
Run in R for the authors' entry:
citation("bgms")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1017/psy.2024.4, 10.1017/psy.2025.10060, 10.1037/met0000847.
R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
Balamuta, J. J. (2026). R Observatory: Metrics for bgms version 0.2.0.0 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About
From data release v2026-10-28, which the citation names so these numbers can be found later.
Health
All 13 check platforms pass.
r-devel-linux-x86_64-debian-clangThe unreleased R on Linux, x86_64, debian-clang
OK
- Version checked
- 0.2.0.0
- Time taken
- 1,327 s
r-devel-linux-x86_64-debian-gccThe unreleased R on Linux, x86_64, debian-gcc
OK
- Version checked
- 0.2.0.0
- Time taken
- 932 s
r-devel-linux-x86_64-fedora-clangThe unreleased R on Linux, x86_64, fedora-clang
OK
- Version checked
- 0.2.0.0
- Time taken
- 909 s
r-devel-linux-x86_64-fedora-gccThe unreleased R on Linux, x86_64, fedora-gcc
OK
- Version checked
- 0.2.0.0
- Time taken
- 953 s
r-devel-windows-x86_64The unreleased R on Windows, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 1,521 s
r-oldrel-macos-arm64The previous release of R on macOS, arm64
OK
- Version checked
- 0.2.0.0
- Time taken
- 156 s
r-oldrel-macos-x86_64The previous release of R on macOS, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 909 s
r-oldrel-windows-x86_64The previous release of R on Windows, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 1,860 s
r-patched-linux-x86_64The patched release of R on Linux, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 1,308 s
r-release-linux-x86_64The current release of R on Linux, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 1,286 s
r-release-macos-arm64The current release of R on macOS, arm64
OK
- Version checked
- 0.2.0.0
- Time taken
- 175 s
r-release-macos-x86_64The current release of R on macOS, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 796 s
r-release-windows-x86_64The current release of R on Windows, x86_64
OK
- Version checked
- 0.2.0.0
- Time taken
- 1,485 s
- 13 OK
Over time
No change since 8 Sep 2026
As a list (10)
| Changed | Worst status | OK | Notes | Warnings | Errors |
|---|---|---|---|---|---|
| 8 Sep 2026 | OK | 13 | 0 | 0 | 0 |
| 7 Sep 2026 | Error | 12 | 0 | 0 | 1 |
| 5 Aug 2026 | OK | 13 | 0 | 0 | 0 |
| 1 Aug 2026 | Note | 12 | 1 | 0 | 0 |
| 9 Jun 2026 | OK | 13 | 0 | 0 | 0 |
| 8 Jun 2026 | Error | 12 | 0 | 0 | 1 |
| 2 May 2026 | OK | 13 | 0 | 0 | 0 |
| 22 Apr 2026 | Note | 12 | 2 | 0 | 0 |
| 18 Apr 2026 | Error | 11 | 2 | 0 | 1 |
| 10 Mar 2026 | Note | 12 | 2 | 0 | 0 |
Since March 2026
Downloads
Method, Downloads Method Download figures count requests logged by each distribution channel. They are not counts of installs or of users, because each channel publishes its own totals and this site reads them.Downloads
- Total downloads in the last 30 days
- 767+0.26% up on the 30 days before, the better directionIt is the sum of 3 channels: CRAN, r2u and autoCRAN.
CRAN rank
4,566 of 26,530
CRAN
690 downloads in the last 30 days
- Rank
- 4,566 of 26,530
- Change
- +3.8% up on the 30 days before, the better direction
It is in the total. Take it out
r2u
23 downloads in the last 30 days
- Rank
- 4,439 of 30,526
- Change
- −47.7% down on the 30 days before, the worse direction
It is in the total. Take it out
autoCRAN
54 downloads in the last 30 days
- Rank
- 717 of 29,212
- Change
- −3.6% down on the 30 days before, the worse direction
It is in the total. Take it out
The total is 767 downloads in the last 30 days. It is the sum of 3 channels: CRAN, r2u and autoCRAN.
Over time
Dependencies
- Needs
- 14
- Dependent packages
- 1
- Suggested by
- 0
Needs (14)
- BH
- dqrng
- graphics
- grDevices
- lifecycle
- methods
- parallel
- Rcpp
- RcppArmadillo
- RcppParallel
- Rdpack
- S7
- stats
- utils
- Installing it adds
- 12 packages, 21.0 MB of source
- Of those, need compilation
- 9
Dependent packages (1)
| Package | Title | Downloads in 30 days |
|---|---|---|
| easybgm | Extracting and Visualizing Bayesian Graphical Models | 504 |
Code
Method, Code Method Code metrics come from reading the released source of each package version. The package is never installed, loaded or run.Code metrics
README, vignettes, a NEWS file and the shares read from its help pages. Files kept only in the repository, such as a pkgdown configuration or CI files, are read by the repository scan instead.
- Functions
- 940
- Public exports
- 39
- Lines of R code
- 24,782
- Median complexity
- 3
Functions (940)
Size and composition
Lines by kind (92,856)
| Kind | Lines | Share |
|---|---|---|
| R code | 24,782 | 27% |
| Tests | 30,657 | 33% |
| Documentation | 5,745 | 6% |
| Guides | 3,123 | 3% |
| Compiled code | 28,549 | 31% |
Lines by language
| Language | Lines | Share |
|---|---|---|
| R | 55,210 | 60% |
| C++ | 20,060 | 22% |
| C | 8,489 | 9% |
| Rd | 5,745 | 6% |
| Other | 1,963 | 2% |
| Vignettes | 1,160 | 1% |
| Markdown | 229 | 0.2% |
Languages are counted from file extensions.
- Files
- 349
- R functions
- 433
- Compiled functions
- 585
- Object systems
- S3: 64 methods, S7: 2 classes
- Deprecated functions
- 17
Complexity
- Median
- 3
- Mean
- 5.49
- Highest
- 53
- Median lines per function
- 17
About complexity
Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.
Call graph figures
- R functions
- 433
- Calls
- 723
- Unconnected
- 52
- Groups
- 2
Growth (13 releases)
Release changes
Tests
The run took too long and was stopped.
- Test cases
- 1,144
- Lines of tests
- 30,657
- Exports named in tests
- 94.9%
Test suite
- Has tests
- Yes
- Test frameworks
- testthat, tinytest
- Test cases
- 1,144
- Snapshot tests
- 13
- Test lines per line of code
- 1.24
Documentation
- Exports documented
- 100%
- Arguments documented
- 95.6%
- Return value documented
- 94.9%
- Help pages with examples
- 59.4%
- Examples run in checks
- 26.8%
Guides (5)
Other documentation
- README
- Yes, 232 words
- Release notes file
- Yes
- Help pages
- 69
- Lines of documentation
- 5,745
Datasets
Method, Datasets Method The datasets inside packages are read from their R objects in datasets
data/ folders when the code is analysed. Each object is described by its class, its shape and its columns, and fingerprinted so the same data can be found in other packages.data() are listed, 76,180 on CRAN and 8,045 on Bioconductor, so the list is not every file in data/.
| Dataset | Size | Columns |
|---|---|---|
| ADHDADHD Symptom Checklist for Children Aged 6--8 Yearsalso in 1 other package | 355 × 19 | group, avoid, closeatt, distract, forget, instruct and 13 more |
| BoredomShort Boredom Proneness Scale Responses | 986 × 9 | language, loose_ |
| WenchuanPTSD Symptoms in Wenchuan Earthquake Survivors Who Lost a Childalso in 1 other package | 362 × 17 |
People
Method, People Method People on the site are the names packages give them in their Author and maintainer identity
DESCRIPTION files: authors from the author list, and the maintainer from the Maintainer field. Spellings of one name become one person only where the rules below allow it, and when in doubt the rules keep people apart.
Repository
Method, figures by host Method Repository signals are the figures read from the source repository a package links to: stars, forks, issues, commits, releases and the time issues take to close. They are read from GitHub, GitLab, Codeberg and Bitbucket.Repository signals
URL and BugReports fields of its DESCRIPTION file. Read-only mirrors, the cran and bioc accounts on GitHub and git.bioconductor.org, are left out.
Bayesian-Graphical-Modelling-Lab / bgms on github.com
- Stars
- 9no change on 30 days ago
- Forks
- 8
- Open issues
- 0
- Last commit
- 3 Aug 2026
Activity
- Commits
- 953
- Open pull requests
- 1
- Tagged releases
- 0
- Latest tagged release
- –
- Issues closed in
- 43 days (median)
- Pull requests closed in
- 0 days (median)
- Pull requests merged
- 89%
- Created
- 14 Sep 2022
- Licence file reads as
- GPL-2.0
Development practices (14)
| Kind | Found |
|---|---|
| Continuous integration | GitHub Actions, R CMD check workflow The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel |
| Governance and community | Code of conduct, Contributing guide, Issue templates, PR template |
| Docs source | GitHub Pages site last deployed 2026-08-05 |
| Coverage | Coverage reporting |
| Reproducibility and dev environment | data-raw/ |
| CRAN release process | cran-comments.md |
| Lint, format, editor | lintr, Lint workflow, EditorConfig, RStudio project |
Method, repository practices Method Beta Each week a scan of the public source repository a package links to looks for the tools a maintainer has set up, and the Repository section lists the findings. Repositories on GitHub and GitLab are scanned.Repository practices
R CMD build reads .Rbuildignore and leaves out files used only in development, such as .github/, .lintr, renv/, a Dockerfile and cran-comments.md, so the released source file holds almost none of them. The repository is the one place these files stay visible.
AI tools
Method, AI tools Method Beta What is found in a repository is not a measure of the code.AI tool findings
Tools
| Tool | First seen | Found |
|---|---|---|
| GitHub Copilot | 4 Mar 2026 | Seen in the repository.github/copilot-instructions.md |
| Claude Code | 27 Apr 2026 | Named in .Rbuildignore.claudeNamed in .gitignore.claude |
- Seen in the repository
- Named in .Rbuildignore
- Named in .gitignore
History
Method, History Method Archived is built from CRAN's archive records, its list of check deadlines and Bioconductor's package records. Every figure is counted to 28 Oct 2026, the day the data was read.Packages leaving
- On CRAN
- Release
| Version | Released | R |
|---|---|---|
| 0.2.0.0 current | 4 Aug 2026 | 4.6.1 |
| 0.1.6.3 | 14 Feb 2026 | 4.5.2 |
| 0.1.6.2 | 20 Jan 2026 | 4.5.2 |
| 0.1.6.1 | 4 Oct 2025 | 4.5.1 |
| 0.1.6.0 | 27 Sep 2025 | 4.5.1 |
| 0.1.4.2 | 5 Dec 2024 | 4.4.2 |
| 0.1.4.1 | 12 Nov 2024 | 4.4.2 |
| 0.1.4 | 21 Oct 2024 | 4.4.1 |
Earlier versions (5)
Release notes (0.2.0.0)
This release rebuilds most of the package on top of 0.1.6.3. bgm() now fits
Gaussian graphical models and mixed discrete-continuous networks alongside
ordinal ones; priors are supplied as objects instead of loose scalars;
inclusion inference is Rao-Blackwellized throughout; bgmCompare() has been
reworked; and a set of checking tools (verdicts(), calibration_check(),
prior_sensitivity_check(), network and edge plots) is new. Several defaults
changed, some arguments were removed, and pairwise parameters are reported on
a different scale, so a script written against 0.1.6.3 can run and give
different numbers. Those changes are listed first.
Throughout this file and in the package's output, "log" means the natural
logarithm.
Breaking changes
Pairwise parameters are reported on the association scale.
bgm()stores and reports pairwise interaction parameters on the association scale: the coefficientomegathat enters every conditional as2 * omega * x. In 0.1.6.3 the same coupling was stored assigma = 2 * omega. Reported pairwise effects —coef(),summary(),extract_pairwise_interactions(), and the raw posterior samples — are therefore about half their 0.1.6.3 values for the same data and model. Main effects, indicators, and inclusion probabilities are unaffected in scale. Code that reads raw pairwise samples, or that compares numbers against a 0.1.6.3 run, needs the factor of two applied; there is no automatic conversion.bgmCompare()moves to the association scale withbgm(), in the same release and by the same factor: the two entry points were mutually consistent in 0.1.6.3 and remain so. Pairwise effects reported bycoef(),summary(),extract_pairwise_interactions(),extract_group_params(), and the raw posterior samples are therefore about half their 0.1.6.3 values, exactly as forbgm(). A stored `bgmCompare()` fit from an earlier version should be refit rather than rescaled, because the prior acted on the old, doubled coordinate: the samedifference_scaleorinteraction_priornumber is now a tighter prior than it was, and difference inclusion Bayes factors move accordingly. The calibration of thedifference_scaledefault under the association-scale parameterization is still under study, so difference verdicts near a decision threshold should be read as scale-contingent.simulate_mrf()reads itspairwiseargument on the association scale too: the discrete Gibbs conditional now accumulates2 * (score - baseline) * pairwisewhere 0.1.6.3 accumulated(score - baseline) * pairwise. A `pairwise` matrix that a 0.1.6.3 script passed in now means twice the coupling it used to, so simulated data are more strongly dependent than before at the same input. Halve a hand-specifiedpairwisematrix to reproduce 0.1.6.3 output; a matrix taken from a 0.2.0.0bgm()fit needs no adjustment, because the fit is on the same scale as the simulator. The continuous (variable_type = "continuous") branch takes a precision matrix and is unaffected.
Changed defaults.
- The default interaction prior is
normal_prior(scale = 1)inbgm(), where 0.1.6.3 used a Cauchy atpairwise_scale = 2.5;sample_ggm_prior()uses the same default, so the GGM prior chain matchesbgm().bgmCompare()takes the same default for its baseline pairwise interactions, so a compare fit and separatebgm()fits at stated defaults now price a baseline interaction alike. Passinteraction_prior = cauchy_prior(scale = 2.5)tobgm()for the 0.1.6.3 prior, remembering that the scale now acts on the association coordinate. Under the joint precision-graph specification the normalizer correction table is keyed on the interaction prior, so the first fit at the new default cell (with a Beta-Bernoulli or Stochastic-Block edge prior) builds and caches a fresh table once. bgmCompare()now defaults tointeraction_prior = normal_prior(scale = 1)for the baseline pairwise interactions and todifference_family = "Normal"for the group differences, both of which were Cauchy in 0.1.6.3 and through 0.2.0.0's development; the baseline default now matchesbgm(), so the two entry points no longer ship different priors for an identically named argument. Results under the defaults change: a fit at the new defaults is a different model from a fit at the old ones, and difference verdicts on categories one group never observed move the most, because a Normal slab bounds an unidentified threshold difference far more tightly than a Cauchy one.cauchy_prior(scale = 1)anddifference_family = "Cauchy"remain fully available and reproduce the previous behaviour.iterandwarmupdefault to2e3inbgm()andbgmCompare(), up from1e3. A default call therefore runs about twice as long and returns twice as many draws as it did in 0.1.6.3. Setiterandwarmupexplicitly to recover the old budget.- The NUTS
target_acceptdefault is0.80in bothbgm()(was0.60) andbgmCompare()(was0.65). Higher target acceptance means smaller steps: expect more leapfrog steps and a longer run per iteration, in exchange for fewer divergences. The adaptive-Metropolis default is unchanged at0.44. Passtarget_acceptto restore the old value. - On continuous and mixed models the prior on the precision diagonal defaults to
exponential_prior(eta = 1), whereetais the rate in the frame in which the pairwise slab has unit scale; the raw rate is derived at fit time aseta / sfor interaction-prior scales. At the default unit slab scale this is the same distribution asgamma_prior(shape = 1, rate = 1), but with a non-unit slab scale the diagonal rate now co-scales. One consequence: a scale-free interaction prior (beta_prime_prior()) on a continuous model requires the diagonal prior to be given withraterather thaneta.
Removed and reshaped arguments.
update_method = "hamiltonian-mc"has been removed; useupdate_method = "nuts". NUTS adapts trajectory length dynamically and is more reliable, especially with edge selection on GGM models. Thehmc_num_leapfrogsargument has been removed with it. A call passing either now fails. On continuous data the new conjugateupdate_method = "gibbs"(see New features) is a second option that needs no step-size tuning at all.- The
standardizeargument ofbgm()andbgmCompare()no longer does anything: pairwise interactions are on the association scale and share one prior scale, so the per-pair adjustment by the product of the two variables' maximum scores has been dropped. The argument stays as a deprecated formal so the failure is informative rather than an unused-argument error.standardize = FALSE, the old default, warns and proceeds, because it is what the sampler already does;standardize = TRUEerrors and points to setting the scale directly throughinteraction_prior(anddifference_scaleforbgmCompare()). There is no per-pair equivalent, and none is planned: standardization belongs in the model rather than in an argument, and a forthcoming g-prior formulation of the interaction prior addresses it there. The per-pair maximum-score adjustment is retired in favour of that direction. - Priors are now objects. The scalar arguments
pairwise_scale,main_alpha,main_beta,inclusion_probability,beta_bernoulli_alpha,beta_bernoulli_beta,beta_bernoulli_alpha_between,beta_bernoulli_beta_between,dirichlet_alpha, andlambdaare deprecated formals: passing one warns and is translated into the corresponding prior object, so old calls keep working for now.edge_priortakes a prior object (bernoulli_prior(),beta_bernoulli_prior(),sbm_prior()); the old character values are still accepted through a deprecation branch. The replacements areinteraction_prior,threshold_prior,means_prior,precision_scale_prior, andedge_prior. Note thatpairwise_scale = stranslates tocauchy_prior(scale = s), preserving the 0.1.6.3 family, so a deprecated call and a call at the new default are not the same model. extract_category_thresholds()is deprecated in favour ofextract_main_effects(), which covers category thresholds, continuous means, and precision diagonal entries in one call.
Changed output and semantics.
extract_ess()reports the Rao-Blackwellized effective sample size for the edge (or difference) indicators — then_effcolumn of the fit summary's inclusion table — where 0.1.6.3 returned the indicator chain's transition-based ESS. A 0.1.6.3-era call therefore gets different numbers with no warning. The extractor family is now coherent: the Rao-Blackwellized inclusion probability (extract_posterior_inclusion_probabilities()), its R-hat (extract_rhat()), and its ESS all describe the same estimate. Fits made with bgms < 0.2.0.0 carry no Rao-Blackwellized draws, so a default call on such a fit falls back to the transition ESS without warning, while an explicitestimator = "rb"errors.- The Rao-Blackwellized estimate is the canonical inclusion probability throughout a fit:
extract_posterior_inclusion_probabilities()defaults toestimator = "rb"(with"raw"still available) andfit$posterior_mean_indicatorreports it. Numbers quoted from a 0.1.6.3 fit will not reproduce exactly; the two estimate the same quantity, the Rao-Blackwellized one with lower variance. - The fit summary's inclusion table has different columns. It now reports the Rao-Blackwellized inclusion probability with a continuous Monte Carlo standard error (
mcse), effective sample size (n_eff), and split-R-hat (Rhat), beside the per-direction transition counts (n0->1,n1->0). The transition-basedn_eff_mixtcolumn is gone (see Deprecated). The three Rao-Blackwellized columns areNAwhere the Rao-Blackwellized draws are constant to double precision, which places the inclusion probability at its numerical bound, and are computed everywhere else. - On a
bgmCompare()fit the Rao-Blackwellized inclusion probabilities areNAfor indicators the sampler never updated — the main-effect differences, unlessmain_difference_selection = TRUE. A previously all-numeric matrix can now contain `NA`, which breaks downstream code that assumes otherwise. TheNAis honest, and the contrast withbgm()is the point: an always-included edge indicator inbgm()is still *proposed* at every iteration, so the Rao-Blackwellized accumulators see its conditional inclusion odds and report a finite Bayes factor. An unselected main-difference indicator is never proposed at all, so there is no Rao-Blackwellized quantity to report — the entry isNAexactly when the indicator was never visited, not because a number was lost. Useestimator = "raw"for the old all-numeric behaviour, or filter onis.na(). - R-hat is the classic split-R-hat (Gelman et al. 2013 / Stan;
Rhat = sqrt(var_plus / W)withvar_plus = (n-1)/n * W + B/n). 0.1.6.3 applied the Brooks-Gelman degrees-of-freedom adjustment used bycoda::gelman.diag, which collapsed to a data-independentsqrt(5/3) ~ 1.29on nearly-saturated binary edge (or difference) indicators — the typical shape of a decisive edge, where one split sub-chain carries a brief excursion and the rest are constant — so the most decisive edges were flagged as unconverged. Reported R-hat changes slightly for all parameters (the adjustment factor was near 1 for healthy chains) and substantially for near-saturated indicators, which now report values near 1, orNAwhen every chain is identical. Chains stuck constant at different values report+Infinstead ofNA. See the diagnostics vignette for how to read indicator R-hat alongside the transition counts and the inclusion probability. - Fitted objects from
bgm()andbgmCompare()are S7 class objects (new dependency:S7). All existing$,[[, andnames()access patterns continue to work. When an incompatibleeasybgmversion is loaded, bgms returns plain S3 lists for backwards compatibility; this shim will be removed in a future release. The compatibility mode is chosen when the fit object is constructed, so loadeasybgmbefore fitting when the fit is meant for use with an oldereasybgm. summary()on abgmsfit returns an additionalquadraticelement (the precision diagonal, reported on the residual-variance scale for continuous and mixed fits) and carries amain_labelattribute.
New features
New model classes.
- Gaussian graphical models:
bgm(x, variable_type = "continuous")fits a GGM with Bayesian edge selection. Sampling uses NUTS on a free-element Cholesky (theta-space) parameterization of the precision matrix, which keeps the precision matrix positive-definite by construction; adaptive-metropolis is also available. - A conjugate GGM Gibbs sampler:
update_method = "gibbs"fits a GGM with a row-by-row update of the precision matrix, with or without edge selection. It needs no step-size or proposal tuning and supports a Normal or Cauchy prior on the edges. Continuous data only. - With
update_method = "gibbs"and edge selection, the first 15% of warmup runs the full model so the precision matrix settles, and edge selection is active for the remaining 85%. Both windows scale with the warmup budget. - Mixed MRF models:
bgm()accepts a per-variablevariable_typevector that mixes"ordinal","blume-capel", and"continuous"types, to estimate networks with both discrete and continuous variables.simulate.bgms()andpredict.bgms()support mixed models. - Missing-data imputation now covers the new model classes:
na_action = "impute"integrates over missing values during MCMC sampling for continuous and mixed models as well as ordinal ones.
Prior specification.
- Priors are constructed by dedicated functions and passed as objects:
normal_prior(),cauchy_prior(), andbeta_prime_prior()for parameter priors;gamma_prior()andexponential_prior()for the precision diagonal;bernoulli_prior(),beta_bernoulli_prior(), andsbm_prior()for the edge prior. Each has aprint()method. The correspondingbgm()formals areinteraction_prior(pairwise slab),threshold_prior(category thresholds, defaultbeta_prime_prior(0.5, 0.5)— the 0.1.6.3main_alpha/main_betapair),means_prior(continuous means, defaultnormal_prior(scale = 1)),precision_scale_prior(precision diagonal), andedge_prior. gamma_prior()andexponential_prior()accept the rate aseta, the rate on the precision diagonal in the frame where the pairwise slab prior has unit scale. The raw rate is derived at fit time aseta / sfor interaction-prior scales, so the prior geometry is held fixed when the slab scale changes; at fixedeta, graph and partial-correlation inference is invariant to the slab scale. Applies to GGM and mixed MRF models.bgm(delta =)sets the exponent of the determinant tilt on the continuous precision block. It defaults toNULL, resolved at fit time to0.5 * log(p)over the continuous variables.bgmCompare(difference_family =)chooses the family of the prior on the group differences,"Normal"(the default) or"Cauchy"(0.1.6.3's fixed behaviour). It governs the pairwise-interaction differences and the main-effect threshold differences alike, and underdifference_selection = TRUEit is the slab of the spike-and-slab.
Inclusion inference.
- Rao-Blackwellized inclusion probabilities and Bayes factors, through
extract_posterior_inclusion_probabilities(estimator = "rb")andextract_inclusion_bf(). For each indicator update the sampler records the one-step drawJ = gamma + (1 - 2 gamma) alpha(pre-move stategamma, birth/death acceptance probabilityalpha), stored per chain and per edge infit$raw_samples$rb_inclusionalongside the raw indicator draws. AveragingJis a lower-variance estimator of the inclusion probability than the raw indic
The notes are cut short here.