Reads the declared posterior atoms of BayesTools posterior draws (the atoms metadata, see posterior_metadata()) and reports whether the draws are structurally atom-free.

posterior_atoms_free(x)

Arguments

x

BayesTools posterior draws, e.g. an element returned by as_mixed_posteriors(), marginal_posterior(), or parameter_mixed_posterior().

Value

TRUE when atoms are declared and all declared scalar marginals and the joint measure have no positive atomic mass; FALSE when the draws declare a point mass or do not declare their atom status. Plain numeric draws, which carry no metadata, are an error. An explicitly unavailable joint law signals its retained typed condition, even when one or more scalar marginals have valid certificates.

Examples

draws <- structure(stats::rnorm(10), class = c("marginal_posterior.simple", "marginal_posterior"))
posterior_atoms_free(draws)
#> [1] FALSE
posterior_metadata(draws, "atoms") <- posterior_atom_attribute()
posterior_atoms_free(draws)
#> [1] TRUE