Checks of the metadata that the draws of a formula coefficient or a factor level carry about the linear map of the fitted coordinates they are a function of. The fit-level hypothesis tests (hypothesis_BF()) and the density backends (hypothesis_density_backend()) use them to describe a target.

posterior_formula_measure_check() stops with the declared refusal (BayesTools_formula_measure_unavailable) when the draws declare the measure ("prior_density" or "atoms") unavailable. posterior_linear_weight_space() returns the coordinate space of the linear weights of the draws ("coefficient" or "formula_contribution", NULL without weights) and stops with BayesTools_refit_required (preceded by refit_class) for outdated metadata. posterior_fitted_linear_weights() returns the weights on the fitted coordinates, with the declared constant multipliers of formula contributions folded in; stochastic multipliers have no raw fitted linear projection and stop with the classes BayesTools_fitted_linear_weights_unavailable and its parent BayesTools_formula_transform_unavailable (and no class of a hypothesis refusal, so that a caller outside of hypothesis_BF() gives it its own). The condition has the fields reason ("stochastic_multiplier") and cause ("original_scale", the cause for which the density backends of a hypothesis refuse the target); its message says that the ordinate density methods are unavailable.

posterior_formula_measure_check(sample, measure)

posterior_linear_weight_space(sample, build = "BayesTools", refit_class = NULL)

posterior_fitted_linear_weights(
  sample,
  weights,
  ordinate_label = "Ordinate density methods",
  build = "BayesTools",
  refit_class = NULL
)

Arguments

sample

posterior draws with metadata (posterior_metadata()).

measure

the measure to check.

build

the name of the build in the request to refit a model with outdated metadata ("Recreate the posterior with the current <build> build.").

refit_class

condition classes that precede BayesTools_refit_required in that request, or NULL.

weights

a named numeric vector of weights on the fitted coordinates.

ordinate_label

how the message names the density methods that compute posterior ordinates.