dot-mixture_working_prior: Derive a single-family working prior from a mixture...

.mixture_working_priorR Documentation

Derive a single-family working prior from a mixture (internal)

Description

Sensitivity grids are defined over a single distribution family's hyperparameters, so mixture priors (from aggregate_experts or robust_prior) need a single-family stand-in. This moment-matches the mixture's actual pooled mean and SD (from prior$fit_summary) to the dominant component's family, so the working prior reflects the full pooled information rather than discarding all but one component. Falls back to the dominant component alone, with a warning, if the family cannot be moment-matched from mean/SD (e.g. "exponential", "weibull") or if fit_summary$sd is unavailable (e.g. logarithmic pooling).

Usage

.mixture_working_prior(prior, quiet = FALSE)

Arguments

prior

A bayprior object, mixture or single-family.

quiet

Logical. If TRUE, suppress the informational message emitted when moment-matching succeeds (warnings for failures/fallback are still shown). Useful for reactive UI contexts. Default FALSE.

Details

Shared by sensitivity_grid and the Shiny sensitivity module (mod_sensitivity.R) so that the parameter ranges shown in the UI are always centred on the same working prior actually analysed.

See aggregate_experts for the pooled mean/variance formula, and elicit_beta, elicit_normal, elicit_gamma, elicit_lognormal for each family's moment-matching identities.

Value

A single-family bayprior object.


bayprior documentation built on Aug. 27, 2026, 1:09 a.m.