select.explore() gains a method = "BMA" option: Bayesian model averaging
as an alternative to the hard Bayes factor threshold (method = "BF_cut"). For
each edge, the posterior model probabilities under H0 and H1 are used to draw a
spike-and-slab mixture; the resulting network weights are posterior medians of
those draws, yielding exact zeros when P(H0|data) > 0.5. The new prior.prob.H0
argument (default 0.5) controls the prior probability assigned to the null
(zero-edge) hypothesis; setting prior.prob.H0 = 0.75 approximately recovers the
selection threshold of BF_cut = 3. One-sided alternatives ("greater",
"less") are supported; "exhaustive" is not (stops with an informative error).truncnorm added to Imports: required for the truncated-normal draws used
in one-sided BMA alternatives.rref_ei not found error: Added simple_rref() function in helpers.R to replace commented-out pracma::rref() call. This fixes a crash in create_matrices() when validating constraint matrices for hypothesis testing with multiple groups.ggm_search() crash: The C++ search function now handles edge cases where the adjacency matrix becomes all zeros or all ones, preventing "sample more elements than in x" errors.qplot() deprecation warning: Replaced deprecated qplot() with ggplot() + geom_density() in plot_prior().rlang to Imports for proper use of .data pronoun in ggplot2 aesthetics.current_thresh, candidate_thresh, thresh_mat, c_thresh_mat, and thresh_mcmc now begin from the same baseline after initialization to avoid drift in Metropolis proposals.Removed NPM library to avoid CRAN compiler errors
search FunctionImproved Initialization
start_adj (the maximum likelihood solution) as the starting point to avoid inefficient sampling.Adaptive Sampling
zeros and nonzeros is now adapted to the newly accepted adjacency matrix (adj_s) rather than the static start_adj.Efficiency Enhancements
find_ids(adj_mat) instead of find_ids(start_adj) to ensure edge modifications are correctly tracked after acceptance.Example in bggm_missing.R reintroduced; Was removed due to irreproducible CRAN error.
Addressed CRAN check error when building vignettes (removed example in bggm_missing.R -- will put it back once it's accepted to CRAN).
Downgraded required R version to 4.0.0
conv_to<>::from with as_scalarprior_sd: Adjusted computation of delta. Also, changed default value for estimation: sqrt(1/3) resulting in delta = 2. For model testing default is more tight, at sigma_sd = 0.5, resulting in delta = 3.prior_sd is now limited to range 0 -- sqrt(1/2)BFpack dependency error fixed.
This version of BGGM included changes based on the JOSS reviews: see here for the overview and here for specific issues.
BGGM was almost completely rewritten for version 2.0.0. This was due to adding support
for binary, ordinal, and mixed data, which required that the methods be written in c ++.
Unfortunately, as a result, lots of code from version 1.0.0 is broken.
Full support for binary, ordinal, and mixed data. This is implemented with the argument type
roll_your_own: compute custom network statistics from a weighted adjacency matrix or a partial
correlation matrix
pcor_to_cor: convert the sampled partial correlation matrices into correlation matrices.
zero_order_cors: compute zero order correlations
convergence: acf and trace plots
posterior_samples: extract posterior samples
regression_summary: summarize multivariate regression
pcor_sum: Compute and compare partial correlation sums
weighted_adj_mat: Extract the Weighted Adjacency Matrix
pcor_mat: Extract the Partial Correlation Matrix
Five additional data sets were added.
ggm_compare_ppc: added option for custom network statistics
Added option to control for variables with formula
A progress bar was added to many functions
Initial CRAN release