Inspect or change package-level defaults used by RoBMA.
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_coresnumber of cores to use for parallel computing (default is one fewer than detected logical cores, with a minimum/fallback of 1)
native_threadsmaximum 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
NAinherits the model's fitting setup: models fitted withparallel = TRUEevaluate their post-processing rows with up tomax_coresnative 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 withparallel = FALSEdoes its post-processing serially unless this option sets an explicit thread count.check_scalingwhether to check scaling of predictors (default
TRUE)silentwhether to suppress fitting progress and some diagnostic warnings (default
FALSE). All fitting functions use this option when theirsilentargument is omitted.update()uses the setting stored with the fit when itssilentargument is omitted.jags.worker_outputfile 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.loowhether to automatically compute LOO (default
FALSE); a GLMM whose nuisance-prior likelihood the quadrature cannot certify warns and the fit is returned without itautocompute.waicwhether to automatically compute WAIC (default
FALSE); a GLMM whose nuisance-prior likelihood the quadrature cannot certify warns and the fit is returned without itautocompute.marglikwhether to automatically compute marginal likelihood (default
FALSE)cluster_likelihood.n_gammanumber 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_bytesone 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;0disables caching. Storage grows as needed. Chains receive equal shares, pooled within each worker process; sequential chains share the total.selection.cache_retainwhether to save selection-normalizer cache entries with the fitted object after fitting or extending (default
FALSE). Retained entries survivesaveRDS()and are restored when extending a compatible fit. Seeremove_selection_cachefor memory costs and removal.selection.samplerthe 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 (seeselection_sampler_infofor the blocks that take part, the fallback to the exact slice sampler and the per-fit record); a block thatsampler.blocksdeclares 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 thatsampler.gatesdeclares are updated together by the corrected gated block sampler when the branch has such a selection block or independent step-selection rows (the estimates ofRoBMA()), 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 orsampler.probabilitiestakes them."slice"uses the samplers JAGS assigns together with the gated and factor slice samplers of the BayesTools JAGS module wheresampler.gatesandsampler.blocksdeclare 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, andupdate()keeps those of the fit. The deprecated values"coarse_corrected"(now"slice.coarse") and"default"(now"jags.default") are accepted with a warning of classRoBMA_deprecated_option_value(familyRoBMA_deprecated).selection.coarse_min_acceptanceacceptance threshold of the corrected sampler (default
0.90, a number between0and1). 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 (seeselection_sampler_info); the location block sampler (sampler.joint) is one corrected sampler per chain, whose acceptance is that of its whole sweep.0disables the fallback and the warning. Captured when each model is compiled, like the other sampler settings.selection.coarse_gridnamed 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_rulescoarse quadrature rule budget (default
3, minimum3). 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.gateswhether 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 underselection.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 (defaultTRUE): 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.blockswhether 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: underselection.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 ofid(),diag(hom = TRUE),cs(),ar1()andcar()) and the scalar correlations ofcs(),hcs(),ar1(),har()andcar()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, andupdate()keeps those of the fit.sampler.jointjoint 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(), andRoBMA()orBMA()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 insampler.probabilitieskeeps 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 (namingbias_indicatorinsampler.probabilitieskeeps 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, ortauandrhoof 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. Setsampler.joint = "off"to omit all joint-sampler markers.sampler.nested.weightswhether to request the nested parameterization for eligible pairs of cumulative selection-weight priors (default
TRUE;FALSEkeeps 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. Setsampler.joint = "off"to use the nested layout alone. If the nested layout is declined, the ordinary rules for joint sampling apply.sampler.probabilitiesa 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 infit$fit$sampler_probabilities. A requested indicator owned by a joint sampler has aNULLtrace. Its report row shows the owner and status"unavailable".default_UISD.effectdefault scaling of the unit information standard deviation for the effect size parameter (default
0.5)default_UISD.heterogeneitydefault scaling of the unit information standard deviation for the heterogeneity parameter (default
0.25)default_UISD.modsdefault scaling of the unit information standard deviation for the moderators (default
0.25)default_UISD.scaledefault scaling of the unit information standard deviation for the scale parameter (default
0.5)default_lograte.sddefault standard deviation of the estimate-specific midpoint log-rate prior in Poisson GLMMs (default
1)default_informed_priors.modsdefault scaling of informed priors for moderators (default
0.5)default_informed_priors.scaledefault scaling of informed priors for the scale parameter (default
0.5)default_bias_weightfunction.alphadefault alpha for the weightfunction (default
1)default_bias_PET.scaledefault scale for the PET (default
1)default_bias_PEESE.scaledefault 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.