Extracts the posterior of one component of a bias mixture from model-averaged posterior samples that hold the whole mixture as one bias element, so that the component can be handled like any other scalar parameter (for example plotted or summarized as a single parameter). The component keeps the model-averaged posterior over all bias branches: in the prior_list of the result, the branches without the component are replaced by a null prior (a point at zero for PET and PEESE, prior_none() for omega) that keeps their model weights.

simplify_as_mixed_posterior_bias(samples, parameter)

Arguments

samples

the output of as_mixed_posteriors() or mix_posteriors(): a list with an element bias of class mixed_posteriors.bias.

parameter

the component to extract: "PET", "PEESE", or "omega".

Value

simplify_as_mixed_posterior_bias() returns samples without the bias element and with the element samples[[parameter]]: the mixed posterior of the component (a single column for "PET" and "PEESE", the omega columns for "omega", the latter with the class mixed_posteriors.weightfunction) and its metadata. The other elements of samples are unchanged.

Details

samples is the output of as_mixed_posteriors() or mix_posteriors() for a bias mixture (e.g., a mixture of prior_PET(), prior_PEESE(), prior_weightfunction() and prior_none() priors), whose bias element has the class mixed_posteriors.bias. For "PET" and "PEESE" the scalar column is the one of the bias element; a bias mixture without that column is represented by the point locations of its branches, which requires every active branch to be a point prior. The draw metadata (atoms, support, prior densities, quantities, and measure refusals) and the prior_list of the component are subset to it; the model weights of the branches are kept.