LaplaceMetropolis: Laplace-Metropolis estimator of log marginal likelihood
Description
As pointed out by Raftery (1996), the Laplace-Metropolis estimator performs well in calculating log marginal likelihood among other methods considered.Usage
LaplaceMetropolis(theta, data = NULL, prior_p, prior_st,
method = c("likelihood","L1center","median"))
Arguments
prior_p
Hyperparameter of the inverse-gamma prior
prior_st
Hyperparameter of the inverse-gamma prior
method
Computing method. L1center
and median
are computationally fast
Details
The idea of the Laplace-Metropolis estimator is to avoid the limitations of the Laplace method by using
posterior simulation to estimate the quantities it needs. The Laplace method for integrals is based on
a Taylor series expansion of the real-valued function $f(u)$ of the $d$-dimensional vector
$u$, and yields the approximation $P(D)\approx (2*pi)^(d/2)|A|^(1/2)P(D|\theta)P(\theta)$,
where $\theta$ is the posterior mode of $h(\theta)=log(P(D|\theta)P(\theta))$, $A$ is minus
the inverse Hessian of $h(\theta)$ evaluated at $theta$, and $d$ is the dimension of $\theta$.
The simplest way to estimate $\theta$ from posterior simulation output, and probably the most accurate,
is to compute $h(\theta^(t))$ for each $t=1,\dots,T$ and take the value for which it is largest.References
A. E. Raftery (1996) Hypothesis testing and model selection, in Markov Chain Monte Carlo In Practice by W. R. Gilks, S. Richardson and D. J. Spiegelhalter, Chapman and Hall, London.