Skip to content

Commit 585823e

Browse files
committed
add details on how laplace approximation provides approximation for marginal likelihood.
1 parent 5d07d01 commit 585823e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/functions-reference/embedded_laplace.qmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ a two-step procedure:
3131
In the above procedure, neither the marginal posterior nor the conditional posterior
3232
are typically available in closed form and so they must be approximated.
3333
The marginal posterior can be written as $p(\phi \mid y) \propto p(y \mid \phi) p(\phi)$,
34-
where $p(y \mid \phi) = \int p(y \mid \phi, \theta) p(\theta) \text{d}\theta$
34+
where $p(y \mid \phi) = \int p(y \mid \phi, \theta) p(\theta) \text{d}\theta$
3535
is called the marginal likelihood. The Laplace method approximates
3636
$p(y \mid \phi, \theta) p(\theta)$ with a normal distribution centered at
3737
$$
@@ -41,6 +41,10 @@ and $\theta^*$ is obtained using a numerical optimizer.
4141
The resulting Gaussian integral can be evaluated analytically to obtain an
4242
approximation to the log marginal likelihood
4343
$\log \hat p(y \mid \phi) \approx \log p(y \mid \phi)$.
44+
Specifically:
45+
$$
46+
\hat p(y \mid \phi) = \frac{p(\theta^* \mid \phi) p(y \mid \theta^*, \phi)}{\hat p (\theta^* \mid \phi, y)}.
47+
$$
4448

4549
Combining this marginal likelihood with the prior in the `model`
4650
block, we can then sample from the marginal posterior $p(\phi \mid y)$

0 commit comments

Comments
 (0)