Skip to contents

Inspect or change package-level defaults used by RoBMA.

Usage

RoBMA.options(...)

RoBMA.get_option(name)

Arguments

...

named option(s) to change. Names must be exact public option names, nonempty, and unique.

name

a single non-missing character string matching one public option exactly; for available options, see details below.

Value

RoBMA.options() invisibly returns a named list with all current options after applying any changes. RoBMA.get_option() returns the current value of the requested option.

Details

The available options are:

max_cores

number of cores to use for parallel computing (default is one fewer than detected logical cores, with a minimum/fallback of 1)

native_threads

maximum number of native threads used to evaluate independent posterior rows of the compiled selection-likelihood batches in post-processing such as likelihood-aware densities, z-plots, and predictions. The default NA inherits the model's fitting setup: models fitted with parallel = TRUE evaluate their post-processing rows with up to max_cores native threads, unless this option sets an explicit thread count. Parallel work is arranged so that every reduction sums in a fixed order, so results do not depend on the thread count; single-state fitting and bridge-sampling evaluations stay serial. A model fitted with parallel = FALSE does its post-processing serially unless this option sets an explicit thread count.

check_scaling

whether to check scaling of predictors (default TRUE)

silent

whether to suppress fitting progress and some diagnostic warnings (default FALSE). All fitting functions use this option when their silent argument is omitted. update() uses the setting stored with the fit when its silent argument is omitted.

jags.worker_output

file path for parallel JAGS worker stdout and stderr when fitting or extending. The parent directory must exist; workers append to the same file and messages may interleave. The default empty string disables capture. Set this option inside any background job that fits the model. It does not change sampling or numerical integration settings.

autocompute.loo

whether to automatically compute LOO (default FALSE); a GLMM whose nuisance-prior likelihood the quadrature cannot certify warns and the fit is returned without it

autocompute.waic

whether to automatically compute WAIC (default FALSE); a GLMM whose nuisance-prior likelihood the quadrature cannot certify warns and the fit is returned without it

autocompute.marglik

whether to automatically compute marginal likelihood (default FALSE)

cluster_likelihood.n_gamma

number of Gauss-Hermite nodes formerly used for weighted normal cluster-unit log-likelihoods (default 15). Normal cluster-unit log-likelihoods, weighted or not, are now integrated in closed form, so the option is still accepted but no longer affects them; selected-normal likelihoods use their own quadrature schedules and integration controls.

selection.cache_max_bytes

one shared storage budget for exact and coarse selection-normalizer caches across all chains in a fit. The default "auto" uses the smaller of 4 GiB and one quarter of currently available system RAM, resolved before fitting. Supply a nonnegative whole number of bytes to set an explicit total; 0 disables caching. Storage grows as needed. Chains receive equal shares, pooled within each worker process; sequential chains share the total.

selection.cache_retain

whether to save selection-normalizer cache entries with the fitted object after fitting or extending (default FALSE). Retained entries survive saveRDS() and are restored when extending a compatible fit. See remove_selection_cache for memory costs and removal.

selection.sampler

the samplers of selection and model-averaged fits, in three tiers. "slice.coarse" (the default) adds the corrected selection sampler: coarse slice proposals with a full-target Metropolis correction for eligible scalar updates involving multivariate, cluster or factor step selection blocks (see selection_sampler_info for the blocks that take part, the fallback to the exact slice sampler and the per-fit record); a block that sampler.blocks declares is updated jointly by the corrected block sampler when it has such a selection block among its children, and by the factor slice sampler of the BayesTools JAGS module otherwise; the selection weights of a branch that sampler.gates declares are updated together by the corrected gated block sampler when the branch has such a selection block or independent step-selection rows (the estimates of RoBMA()), and the other gated parameters keep the gated sampler; indicators with fixed prior probabilities (the bias, heterogeneity, effect and moderator indicators) whose children include such a selection block, and the bias indicator of independent step-selection rows, are updated by the screened indicator sampler unless a joint sampler or sampler.probabilities takes them. "slice" uses the samplers JAGS assigns together with the gated and factor slice samplers of the BayesTools JAGS module where sampler.gates and sampler.blocks declare them. "jags.default" uses only the samplers JAGS assigns, in every model and disables all specialized sampler options (as "default" did in RoBMA 4.1.1). The posterior target is unchanged. Settings are captured when each model is compiled, and update() keeps those of the fit. The deprecated values "coarse_corrected" (now "slice.coarse") and "default" (now "jags.default") are accepted with a warning of class RoBMA_deprecated_option_value (family RoBMA_deprecated).

selection.coarse_min_acceptance

acceptance threshold of the corrected sampler (default 0.90, a number between 0 and 1). Each corrected sampler that made at least 50 evidence proposals during adaptation (proposals for which a selection block's surrogate differed from its exact density) with an acceptance rate below it updates its parameter, block or indicator with the exact sampler for the rest of the fit, and a fit with at least 1,000 counted evidence proposals whose post-adaptation acceptance rate, or that of its worst sampler, is below it warns. A block of d directions is judged by its acceptance rate to the power 1/d (see selection_sampler_info); the location block sampler (sampler.joint) is one corrected sampler per chain, whose acceptance is that of its whole sweep. 0 disables the fallback and the warning. Captured when each model is compiled, like the other sampler settings.

selection.coarse_grid

named nonnegative grid steps c(mean = .05, variance = .05, log_weight = .01) of the dense multivariate step blocks; cluster and factor blocks evaluate their coarse rule at the actual parameters and ignore the grid. Mean spacing is its step times the largest original sampling SE in the block; covariance-diagonal spacing is its step times that SE squared. Each diagonal is rounded upward on a grid whose origin is its own squared original sampling SE, retaining all off-diagonal entries. Positive weights are rounded on the natural-log scale; zero weights remain zero. A zero step retains that coordinate exactly but does not disable the coarse rule budget or fallback. These settings affect proposals, not the corrected target.

selection.coarse_max_rules

coarse quadrature rule budget (default 3, minimum 3). Dense multivariate blocks try at most this many rules from the beginning of the fitted quadrature schedule for a coarse anchor; unsupported or unsuccessful coarse integration uses the prescribed unit normalizer, without QMC fallback. Cluster and factor blocks use the one rule of this number in their own schedule (the last rule of a shorter schedule) at the actual parameters, and the exact density where that rule is unavailable. The full-target evaluator retains its ordinary numerical controls and diagnostics.

sampler.gates

whether the parameters of the publication-bias branches of model-averaged fits (RoBMA(), RoBMA.mv()) are updated by the gated slice sampler of the BayesTools JAGS module, or, for the selection weights of a branch under selection.sampler = "slice.coarse" (a branch with a selection block that takes part in the corrected sampler or with independent step-selection rows), by the corrected gated block sampler (default TRUE): while the bias indicator does not select a branch, its parameters are drawn directly from their prior instead of by slice sampling. selection.sampler = "jags.default" turns the gated sampler off.

sampler.blocks

whether the global parameters of selection models with estimated heterogeneity are updated jointly (default TRUE), slice-sampling along the principal directions of their posterior covariance learned during adaptation: under selection.sampler = "slice.coarse" by the corrected block sampler when the block has a dense, cluster or factor selection block that takes part in the corrected sampler (selection_sampler_info), otherwise and under "slice" by the factor slice sampler of the BayesTools JAGS module. Single models (bselmodel(), bselmodel.mv()) update the effect, moderator, heterogeneity and selection-weight parameters together, the directly sampled scalar random-effect SDs (the SD of a random intercept, or the one SD shared by the levels of id(), diag(hom = TRUE), cs(), ar1() and car()) and the scalar correlations of cs(), hcs(), ar1(), har() and car() included. Never block members: random-effect SD priors over several levels and unstructured correlation matrices, vector (mean-difference and orthonormal) factor terms, the unit-level latent parameters and random-effect coordinates, and every mixture, spike-and-slab, ordered and point prior. Model-averaged fits (RoBMA.mv()) update only the allocation SD and weights of the heterogeneity allocation together. selection.sampler = "jags.default" turns both block samplers off. Neither option changes the model or its posterior distribution, only the draws; settings are captured when each model is fitted, and update() keeps those of the fit.

sampler.joint

joint sampler policy for eligible model-averaged fits. "auto" (the default) allows the joint bias, effect-inclusion and intercept update on independent, unmoderated step-selection models. It also allows joint coefficient and heterogeneity updates in unweighted independent Gaussian meta-regressions with one standardized numeric moderator, no supplied covariance matrix, eligible zero-spike normal mixtures, and up to 800 retained estimates. "bias" requests the independent joint bias update and also allows unweighted selection meta-regressions with additive numeric or factor moderators on their fitted scale, no supplied covariance matrix, and the ordinary selection-weight layout. "gaussian" requests the Gaussian joint sampler, including for larger models and for unstandardized numeric moderators. Both Gaussian routes require sufficient proposal coverage. "location" requests the location block sampler, which "auto" also uses for multilevel, random-effect and clustered fits of normal outcomes (RoBMA.mv(), BMA.mv(), and RoBMA() or BMA() with clusters) and for independent fits with a gated moderator that no other joint sampler takes (including an automatic Gaussian candidate that its bound design declines, but not a fit over the Gaussian row limit, which keeps the ordinary samplers): one update of all location terms whose prior mixes an exact zero with a normal slab, the other normal location coefficients and the standardized effects of the sampled random-effect term or the clusters, with the inclusion indicators updated along the Gaussian posterior of the correlated coefficients and the study effects; under "location" every fit of a normal outcome qualifies. Its selection-model updates use the corrected selection sampler's surrogate and one exact correction per update (selection.sampler); naming a location indicator in sampler.probabilities keeps the ordinary samplers. With a publication-bias mixture of no-bias, selection, PET and PEESE components it also updates the bias indicator and the PET and PEESE coefficients together with the intercept (naming bias_indicator in sampler.probabilities keeps their ordinary samplers). When it owns the standardized effects, it also owns the heterogeneity parameters of their term (the total heterogeneity SD and its allocation weights, or tau and rho of clustered fits), updates them with their ordinary samplers and follows them with an exact joint rescaling of the heterogeneity and the standardized effects that leaves the fitted model unchanged. "clustered" and "clustered.scale" request the grouped moderator update in eligible positive-direction clustered models with one factor moderator and no bias-exempt rows. "clustered.scale" also updates heterogeneity jointly. Unsupported or declined candidates use the ordinary sampler policy. Set sampler.joint = "off" to omit all joint-sampler markers.

sampler.nested.weights

whether to request the nested parameterization for eligible pairs of cumulative selection-weight priors (default TRUE; FALSE keeps the ordinary layout). The physical weight priors and likelihood are preserved. The nested layout can be used with the independent joint bias update in unmoderated models and with the location block sampler. Set sampler.joint = "off" to use the nested layout alone. If the nested layout is declined, the ordinary rules for joint sampling apply.

sampler.probabilities

a character vector of exact JAGS indicator node names to request conditional branch probabilities from the finite sampler. The names must exist in each fit. The default is character(0). Read the traces in fit$fit$sampler_probabilities. A requested indicator owned by a joint sampler has a NULL trace. Its report row shows the owner and status "unavailable".

default_UISD.effect

default scaling of the unit information standard deviation for the effect size parameter (default 0.5)

default_UISD.heterogeneity

default scaling of the unit information standard deviation for the heterogeneity parameter (default 0.25)

default_UISD.mods

default scaling of the unit information standard deviation for the moderators (default 0.25)

default_UISD.scale

default scaling of the unit information standard deviation for the scale parameter (default 0.5)

default_lograte.sd

default standard deviation of the estimate-specific midpoint log-rate prior in Poisson GLMMs (default 1)

default_informed_priors.mods

default scaling of informed priors for moderators (default 0.5)

default_informed_priors.scale

default scaling of informed priors for the scale parameter (default 0.5)

default_bias_weightfunction.alpha

default alpha for the weightfunction (default 1)

default_bias_PET.scale

default scale for the PET (default 1)

default_bias_PEESE.scale

default scale for the PEESE (default 5)

For joint sampler candidates and explicitly requested weight or probability options, inspect attr(fit$fit, "sampler_declarations")$robma for eligibility and sampler assignments. The joint sampler report records "budget_bypassed" when an otherwise eligible automatic Gaussian fit exceeds the row limit. For the location block sampler, $joint$counters holds its per-fit counters (with a bias indicator owned by the block, max_swap_working is the largest representability criterion of the working means after adaptation, over the cross-family swap's own base points that pass their representability check, also in attempts that end before a proposal, and over the proposal ends that were rebuilt successfully; a criterion above 1e-8 skips the swap and counts in swap_unrepresentable at the attempt's own end and in swap_irreproducible at its rebuilt proposal end; the criterion grows with the number of rows and with their |y| / SE, so for outcomes located far from zero relative to their standard errors every swap is skipped, measured from a median |y| / SE of about 1,000 with 10 rows, between 61 and 81 with 1,000 rows and between 20 and 30 with 10,000 rows, while the chain keeps its other label moves) and $joint$scale, present when the block also owns the heterogeneity sources, the scale ownership decisions and the move's counters: moves counts updates in states where the declared sources are active (slice calls that exhausted their interval included), identity and outside the updates where the move is the identity (sources inactive, or an allocation weight or share outside [2^-20, 1 - 2^-20]); after adaptation likelihood_changed counts the moves that changed the likelihood by rounding, likelihood_rejected those its correction undid, and likelihood_change_max is the largest such change (log units). $evidence describes indicators that may not switch (it decides nothing and is absent when no run reported): location per gate and chain the updates after adaptation and the transitions the chain retained (switched_on, switched_off), with the inner stage's flips and log odds as inner_*; screened per screened indicator of the corrected selection sampler (node) and chain its levels, its updates after adaptation, the observed changes of its level, and the mean and maximum probability that an update changes the level (leave_mean, leave_max: before its exact correction, and the exact probability once the indicator fell back to exact updates), where run, process and serial identify a record whose node could not be named; with a bias indicator owned by the block, bias per chain the proposals and acceptances of its label, Gaussian family, slope and swap moves, the swaps skipped because their base point was not representable (swap_unrepresentable) or because their proposal did not reproduce them (swap_irreproducible), and their cross-family evidence over the updates after adaptation, bias_labels the tally of those updates by the label they end in, and bias_sojourns per chain the runs of the retained draws of the indicator in the step-selection and the Gaussian families (absent when the indicator is not monitored). fit$fit$samplers lists the assigned sampler for each sampled node in the first worker, and fit$fit$samplers_by_worker records assignments when workers differ. The probability report includes the requested spelling and the fitted trace key. These settings and declarations carry over to update().

Boolean options require scalar TRUE or FALSE values. max_cores must be integer-like and at least 1; cluster_likelihood.n_gamma must be integer-like and at least 3. native_threads accepts NA or a positive integer. selection.coarse_min_acceptance must be a number between 0 and 1. Scale and alpha defaults must be finite positive numbers.