marginal_likelihood: Marginal likelihood estimation

View source: R/bayes-diagnostics.R

marginal_likelihoodR Documentation

Marginal likelihood estimation

Description

Estimates the log marginal likelihood using the modified harmonic mean estimator (Geweke, 1999). This provides a practical Bayesian model comparison tool via Bayes factors: BF12 = exp(logML1 - logML2).

Usage

marginal_likelihood(object, ...)

Arguments

object

A "dsge_bayes" object.

...

Additional arguments passed to methods (e.g., method, tau).

Details

The harmonic mean estimator is known to be numerically unstable in some cases. The modified version (with truncation parameter tau) reduces this instability. Results should be interpreted with caution and compared across models only when both use similar MCMC settings.

Value

An object of class "dsge_marginal_likelihood".


dsge documentation built on Sept. 25, 2026, 5:08 p.m.