R/selection-kernels.R
selection_backend_spec.Rdselection_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
)a selection prior, p-hacking prior, composed bias prior,
prior_none(), prior_mixture(), or a list of those priors.
backend target. Currently only "jags" is supported.
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).
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.
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.
A list describing the compiled backend specification.