MarginalLikelihoodSelection#

class cultivars.bayes.evidence.MarginalLikelihoodSelection(*, log_value, mcse, method, n_draws, source, nobs=0, notes=())[source]#

A log marginal likelihood with its provenance.

Variables:
  • log_value (float) – The log marginal likelihood of the sample.

  • mcse (float) – Monte Carlo standard error of log_value; 0.0 for an analytic value, nan when the estimator could not assess it.

  • method (str) – How it was obtained – "analytic", "chib", "modified harmonic mean", or "bridge sampling".

  • n_draws (int) – Posterior draws the estimate used; 0 for analytic.

  • source (str) – The model, for tables.

  • nobs (int) – Observations the likelihood scored; 0 when unknown. Two records are comparable only when this agrees, and compare says so when it does not – a VAR with more lags conditions on more presample rows and scores fewer, which alone shifts its log marginal likelihood by roughly the per-observation log density times the difference.

  • notes (tuple[str, ...]) – Caveats that qualify the number.

See also

Attributes#

log_value

The log marginal likelihood of the sample.

mcse

Monte Carlo standard error of log_value.

method

How the value was obtained, for example "analytic" or "chib".

n_draws

Posterior draws the estimate used; 0 for an analytic value.

source

The model the value belongs to, used as its row label.

nobs

Observations the likelihood scored; 0 when unknown.

notes

Caveats that qualify the number; compare() carries them into its table.

Methods#

bayes_factor_strength(other)

Verbal strength of the evidence for self over other.

compare(*others[, names, prior_probabilities])

Rank models by evidence with posterior model probabilities.

log_bayes_factor(other)

\(\log m_{\text{self}}(y) - \log m_{\text{other}}(y)\): positive favours self.