R/priors-weightfunction.R
prior_weightfunction.Rdprior_weightfunction creates a prior distribution for
fitting a RoBMA selection model. The side and steps arguments
define the p-value bins, and the weights argument defines the prior on
the publication weights in those bins.
prior_weightfunction(
side = "one-sided",
steps = c(0.025, 0.05),
weights = wf_cumulative(),
reference = "most_significant",
prior_weights = 1,
model = selection_model()
)
wf_cumulative(alpha = NULL)
wf_fixed(omega)
wf_independent(prior, scale = "omega")side geometry. Either "one-sided" or "two-sided".
increasing p-value cut points between 0 and 1.
a weight-prior object created by wf_cumulative(),
wf_fixed(), or wf_independent().
reference bin. Currently only "most_significant" is
supported and fixes the most significant bin to omega = 1.
prior odds associated with a given distribution.
a fixed selection-model specification from
selection_model(). Its choices do not add weight-prior parameters or
change prior_weights.
finite numeric cumulative-Dirichlet concentration parameters,
each at least 0.01. If omitted, a flat Dirichlet prior is used with
one concentration parameter per bin. The supported minimum is not a
numerical guarantee: accepted R sampling can still be unavailable, and
two-bin cumulative JAGS initialization near the minimum can repeatedly
refuse ratios that are no longer representable strictly inside (0, 1).
Such failures are explicit; concentrations, draws and initialization settings
are not repaired. See prior_functions for sampling conditions.
fixed non-negative relative publication weights, one per bin.
When assembled by prior_weightfunction(), the reference-bin weight
must be exactly 1. Named and integer values are accepted; nearby values are
refused without normalization.
prior distribution for each non-reference weight.
latent scale for independent weights. "omega" places the
prior directly on the non-negative publication weight. "log_omega"
places the prior on log(omega) and transforms with
omega = exp(log_omega), allowing weights above one whenever the log
prior assigns mass above zero. "log" is accepted as an alias of
"log_omega".
prior_weightfunction returns an object of class 'prior'.