prior_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")

Arguments

side

side geometry. Either "one-sided" or "two-sided".

steps

increasing p-value cut points between 0 and 1.

weights

a weight-prior object created by wf_cumulative(), wf_fixed(), or wf_independent().

reference

reference bin. Currently only "most_significant" is supported and fixes the most significant bin to omega = 1.

prior_weights

prior odds associated with a given distribution.

model

a fixed selection-model specification from selection_model(). Its choices do not add weight-prior parameters or change prior_weights.

alpha

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.

omega

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

prior distribution for each non-reference weight.

scale

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".

Value

prior_weightfunction returns an object of class 'prior'.

See also

Examples

p1 <- prior_weightfunction(
  side = "one-sided",
  steps = c(.05, .10),
  weights = wf_cumulative(alpha = c(1, 1, 1))
)

p2 <- prior_weightfunction(
  side = "one-sided",
  steps = c(.05),
  weights = wf_independent(prior("beta", list(1, 1)))
)