Compiles the active ordered totals and distinct allocation coordinates into a function of a numeric draws matrix.

JAGS_ordered_density_kernel(prior_list, allocation_chart = NULL)

Arguments

prior_list

named list of original bound ordered priors.

allocation_chart

optional named list keyed by allocation key. Each entry has kind = "group" and a nonempty proper index subset J, or kind = "pair" and two distinct indices. Its gamma factors are replaced by the corresponding Beta density of the group or pair share.

Value

A function of samples, a numeric matrix with named coordinate columns, returning one log density or log probability per row.

Details

Total mixture components are localized independently for each row; multi-slice spike totals share one inclusion state. Each total slice and allocation key contributes once. Mixture-state probabilities, inactive component sources, and nuisance-only chart factors are omitted because they are constant along the conditional chart. This is a numerical conditional kernel, not a bridge density. Expression totals raise BayesTools_ordered_expression_unavailable, missing coordinates raise BayesTools_ordered_coordinates_unavailable, and invalid indicators or missing (NA) total values of a sampled total raise BayesTools_ordered_invalid_state; all inherit BayesTools_ordered_unavailable. Ordinary values outside numeric support return -Inf. Refit when bound ordered metadata are unavailable.