- New planning method
"BSDA"(Bayesian structural design analysis) indesign(). It recommends a sample size at which edge selection reaches a target sensitivity or specificity with a given power, using the probit inversion of a simulated power curve. ggm_parameters()gains apipargument (prior inclusion probabilities), supplied as a single probability or a matrix. Required by BSDA and carried throughelicit_prior().bsda_control()is an helper control list where the user can specify: the sampler, model-fit, and search settings for BSDA planning.validate()now supports BSDA plans, reporting the achieved power at the recommended sample size with a confidence interval.design(method = "BFDA")gains anedgeargument to plan around a specific edge directly (1-based indices intoK/G), bypassingrho_quantile-based automatic selection.- New generic
power_curve(), formethod = "DPIR"(Pr(DPIR > threshold)at a grid of sample sizes, both globally and averaged across off-diagonal parameters — unlikedesign()'s"pw"target, which is the weakest parameter, not the average),method = "BFDA"(power and error rate at a grid of sample sizes, for a single edge), andmethod = "BSDA"(Pr(sensitivity/specificity >= target)at a grid of sample sizes, over the whole graph), instead of searching forn*.print()andplot()functions are available for all three methods."DPIR"is the default method, as indesign().
print()methods forggm_parametersandggm_elicitednow display the prior inclusion probabilities (range) when supplied.- Internal C++ routines standardized under the
cpp_naming convention:- Renamed internal helpers (e.g.,
power_at_n()tocpp_power_at_n()). - Added
cpp_-prefixed wrapper functions to convert C++ structs toRcpp::Listfor R export.
- Renamed internal helpers (e.g.,
-
New exported function
constrain_precision_to_graph(), which projects a precision matrix onto a fixed undirected graph and returns the precision matrix constrained to the graph's zero pattern (where entries at non-edges are set to zero). -
design.ggm_elicited()now includes annsim_bfargument controlling the number of Monte Carlo simulations used in the Bayes-factor computation for the sparse (G-Wishart) BFDA path. Defaults to1000L, matching the underlying C++ default. Finally, the value is recorded in the returned design object'scall_infofor sparse BFDA designs. -
The DPIR and dense BFDA design routines now report timing information, which in 0.1.0 was available only for the sparse BFDA path. Durations are returned in the design object:
duration_bisection_globalandduration_bisection_pwfor DPIR,duration_h0andduration_h1for BFDA.
- First Github version.