Changelog
Source:NEWS.md
bgms 0.1.6.3
New features
- added
main_difference_selectionargument tobgmCompare()to control whether difference selection is applied to main effect (threshold) differences. WhenFALSE(the new default), main effect differences are always estimated without selection, while pairwise effect selection proceeds independently. - added
standardizeargument tobgm()andbgmCompare()to optionally scale the Cauchy prior for pairwise interactions based on the range of response scores. When enabled, the prior scale is multiplied by the maximum score product for each pair, ensuring equivalent relative shrinkage regardless of the number of response categories. The scaling factors are stored infit$arguments$pairwise_scaling_factors. - added
simulate_mrf()function for standalone MRF data simulation with user-specified parameters - added
simulate.bgms()S3 method to generate new observations from a fitted model using estimated parameters. Supports parallel processing viacoresargument when usingmethod = "posterior-sample"with optional progress bar - added
predict.bgms()S3 method to compute conditional probability distributions P(X_j | X_{-j}) for one or more variables given observed data - both methods support using posterior mean parameters (
method = "posterior-mean") or averaging over posterior draws (method = "posterior-sample") for full uncertainty propagation -
baseline_categoryis now stored in the fitted object’s arguments for use with Blume-Capel variables in simulation and prediction
Bug fixes
- fixed mass matrix adaptation for NUTS/HMC: inverse mass matrix now correctly uses variance (following STAN convention) instead of precision, substantially improving sampling efficiency.
- fixed step size heuristic to re-run after each mass matrix update during warmup, ensuring step size is appropriate for the current mass matrix.
- fixed step size heuristic to resample momentum on each iteration (matching STAN’s init_stepsize behavior), improving step size selection.
- fixed energy diagnostic computation in NUTS to use actual accepted trajectory momentum instead of a random sample, making E-BFMI diagnostic meaningful.
- fixed Blume-Capel interaction term computation to use centered scores
(c - ref)instead of raw categorycin the pseudolikelihood denominator. This bug caused severe NUTS performance degradation (100% max tree depth hits) when using non-zero baseline categories.
Deprecated
-
mrfSampler()is deprecated in favor ofsimulate_mrf()for consistency with S3 method naming conventions
bgms 0.1.6.2
CRAN release: 2026-01-20
New features
- added option to separately specify beta priors for the within- and between-cluster probabilities for the SBM prior.
Other changes
- reparameterized the Blume-capel model to use (score-baseline) instead of score.
- implemented a new way to compute the denominators and probabilities. This made their computation both faster and more stable.
- refactored c++ code for better maintainability.
- removed the prepared_data field from bgm objects.
bgms 0.1.6.1
CRAN release: 2025-10-04
bgms 0.1.6.0
CRAN release: 2025-09-27
New features
- added NUTS and HMC options for sampling
bgm()andbgmCompare()models - added support for running multiple chains in parallel
- added user interrupt handling for parallel sampling
- added Markov chain diagnostics (effective sample size and R-hat) for sampled parameters
- added
summary(),print(), andcoef()methods for fitted objects - MCMC sampling in
bgm()andbgmCompare()is now reproducible when aseedargument is specified
Other changes
- improved progress bar for parallel sampling
-
summary()now integrates the functionality of the oldsummary_SBM() - removed options for modeling main differences; main differences are now always estimated or selected, equivalent to the previous
main_difference_model = "collapse"setting
Bug fixes
- fixed an out-of-bounds error in
bgmCompare()when handling missing data - fixed a bug in the SBM prior computation
Deprecated
- In
bgm(), the following arguments are deprecated:-
interaction_scale→ usepairwise_scale -
burnin→ usewarmup -
save→ no longer needed (all outputs are returned by default) -
threshold_alpha,threshold_beta→ usemain_alpha,main_beta
-
- In
bgmCompare(), arguments related to difference models are deprecated:-
main_difference_model(removed without replacement) -
reference_category→ usebaseline_category -
pairwise_difference_*,main_difference_*→ use unifieddifference_*arguments -
pairwise_beta_bernoulli_*,main_beta_bernoulli_*→ use unifiedbeta_bernoulli_*arguments -
interaction_scale→ usepairwise_scale -
threshold_alpha,threshold_beta→ usemain_alpha,main_beta -
burnin→ usewarmup -
save→ no longer needed
-
- Deprecated extractor functions:
- Deprecated object fields:
-
$gamma(pre-0.1.4) and$indicator(0.1.4–0.1.5) → replaced by$raw_samples$indicator -
$main_effects(pre-0.1.4) and$posterior_mean_main(0.1.4–0.1.5) → replaced by$raw_samples$main(raw samples) and$posterior_summary_main(summaries)
-
bgms 0.1.5.0 (GitHub only)
New features
- The bgmCompare function now allows for network comparison for two or more groups.
- The new summary_sbm function can be used to summarize the output from the bgm function with the “Stochastic-Block” prior.
- Two new data sets are included in the package: ADHD and Boredom.
Other changes
- The bgm function with the “Stochastic-Block” prior can now also return the sampled allocations and block probabilities, and sample and return the number of blocks.
- The underlying R and c++ functions received a massive update to improve their efficiency and maintainance.
- Repository moved to the Bayesian Graphical Modelling Lab organization.
- Included custom c++ implementations for exp and log on Windows.
Bug fixes
- Fixed a bug in the bgmCompare function with selecting group differences of blume-capel parameters. Parameter differences that were not selected and should be fixed to zero were still updated.
- Fixed a bug in the bgmCompare function with handling the samples of blume-capel parameters. Output was not properly stored.
- Fixed a bug in the bgmCompare function with handling threshold estimation when missing categories and main_model = “Free”. The sufficient statistics and number of categories were not computed correctly.
- Partially fixed a bug in which the bgms package is slower on Windows than on Linux or MacOS. This is because the computation of exp and log using the gcc compiler for Windows is really slow. With a custom c++ implementation, the speed is now closer to the speed achieved on Linux and MacOS.
bgms 0.1.4.2
CRAN release: 2024-12-05
bgms 0.1.4.1
CRAN release: 2024-11-12
This is a minor release that adds some documentation and output bug fixes.
bgms 0.1.4
CRAN release: 2024-10-20
bgms 0.1.3
CRAN release: 2024-02-25
bgms 0.1.1
CRAN release: 2023-09-01
This is a minor release adding some new features and fixing some minor bugs.
New features
- Missing data imputation for the bgm function. See the
na.actionoption. - Prior distributions for the network structure in the bgm function. See the
edge_prioroption. - Adaptive Metropolis as an alternative to the current random walk Metropolis algorithm in the bgm function. See the
adaptiveoption.
User level changes
- Changed the default specification of the interaction prior from UnitInfo to Cauchy. See the
interaction_prioroption. - Changed the default threshold hyperparameter specification from 1.0 to 0.5. See the
threshold_alphaandthreshold_betaoptions. - Analysis output now uses the column names of the data.