Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update easybgm for full compatibility with bgms >= 0.1.6.4.
Problem / Motivation
easybgm relied on direct field access to internal bgms objects (e.g., fit$arguments$..., fit$posterior_summary_pairwise$...) and legacy version checks (packageVersion("bgms") < "0.1.6"), which are incompatible with bgms 0.1.6.4. Most importantly, continuous and mixed data were routed to BGGM by default, even though bgms now supports all data types.
Proposed Changes / New Functionality
bgms is now the default for all types
fit <- easybgm(data, type = "continuous")
Per-variable type specification (bgms only)
fit <- easybgm(data[, 1:3], type = c("ordinal", "ordinal", "continuous"))
Interpretable scales available in output
fit$partial_correlations # for continuous models
fit$log_odds # for ordinal/binary models
BDgraph now correctly fits GGM instead of GCGM when the data has missing values (see also below)
fit <- easybgm(data, type = "continuous", package = "BDgraph")
Open questions:
Files Edited
R/easybgm.R — Default routing to bgms for all types; per-variable type handling; rewritten documentation
R/functions.bgms.R — Replaced all direct field access with extractor functions; added interpretable parameter scales
R/functions.bgmscompare.R — Removed legacy code paths; migrated to extractors
R/easybgm_compare.R — Added validation gate for continuous/mixed without BGGM; rewritten documentation
R/summary.easybgm.R — Removed version checks; added note about available parameter scales
R/summary.easybgm_compare.R — Removed version checks
R/plottingfunctions.bgms.R — Removed version checks and legacy save conditionals
R/plottingfunctions.bgmCompare.R — Same cleanup
R/plottingfunctions.easybgm.R — Removed version checks
R/functions.bdgraph.R — Fixed GGM vs GCGM routing for continuous data
DESCRIPTION — Version bumped to 0.4.0; bgms dependency set to >= 0.1.6.4
tests/testthat/test-easybgm.R — Added tests for new functionality
Testing and Validation
Unit Tests: All 237 tests pass (0 failures, 0 warnings, 0 skips)
Numerical Validation: Verified extractor outputs match expected structure across all model types (GGM, OMRF, mixed MRF) including edge cases (single-variable blocks)
R CMD check: roxygen2::roxygenise() and tools::checkRd() pass cleanly for all .Rd files