selection_backend_spec() compiles step-selection and p-hacking prior objects into active backend parameters. The returned object contains stable p/z geometry, JAGS prior/transform code, monitor names, initial values, and data constants. Set include_init = FALSE for deterministic metadata without drawing unused initial values.

selection_backend_spec(
  priors,
  backend = "jags",
  names = list(omega = "omega", alpha = "alpha"),
  global_breaks = NULL,
  include_init = TRUE
)

Arguments

priors

a selection prior, p-hacking prior, composed bias prior, prior_none(), prior_mixture(), or a list of those priors.

backend

backend target. Currently only "jags" is supported.

names

named list of backend parameter names for the public nodes (omega, alpha, pi_null, beta_null, phack_kind, phack_z_source, phack_z_dest); omitted entries keep their default names. The names are used in the generated JAGS code, monitors, and initial values of single-branch and mixture specifications alike, so they must be distinct valid JAGS node names that do not coincide with internal selection nodes. Custom names (and global_breaks) change only the syntax, monitors, and initial values that this function emits: the evaluators of the marginal-likelihood tools (JAGS_marglik_parameters(), JAGS_marglik_priors() and bridge sampling) read the default names and the grid that JAGS_fit() emits, so they do not evaluate the draws of a model emitted with customized names correctly (without a warning).

global_breaks

optional global p-value break grid. Like names, it changes only the emitted syntax; the evaluators of the marginal-likelihood tools read the default grid, so they do not evaluate the draws of a model emitted with a customized grid correctly.

include_init

whether to generate JAGS initial values. Defaults to TRUE; when FALSE, the returned init field is NULL and compilation does not change the random-number state.

Value

A list describing the compiled backend specification.