# Endogenous prior

**URL:** <https://forum.dynare.org/t/endogenous-prior/18772>\
**Category:** ML/Bayesian estimation\
**Created:** [24 August 2021 13:04 UTC](https://forum.dynare.org/t/endogenous-prior/18772 "2021-08-24T13:04:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZBCPA](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/aeb1de/32.png) [@ZBCPA](https://forum.dynare.org/u/ZBCPA)\
**Post date:** [24 August 2021 13:05 UTC](https://forum.dynare.org/t/endogenous-prior/18772/1 "2021-08-24T13:05:00Z")

</div>

Dear Johannes,

With code “endogenous prior” in Bayesian estimation, the model’s second moments can match the data better. However, I find that in terms of model comparison, with or without “endogenous prior” can derive quite different log data density and the model comparison results can even turn over ( model A is better than B with “endogenous prior”, while model B is better than A without “endogenous prior”). Could I ask if this phenomenon makes sense?

Many thanks in advance.

Huan

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [26 August 2021 13:08 UTC](https://forum.dynare.org/t/endogenous-prior/18772/2 "2021-08-26T13:08:32Z")

</div>

Yes, see

> [@How to see whether the model fit the real data well?](https://forum.dynare.org/t/how-to-see-whether-the-model-fit-the-real-data-well/14233/8):
>
> You still did not grasp the main point: the MDD will incorporate the fit of ALL moments, weighted by the precision they are estimated with. That may imply that the 200th autocorrelation between output and consumption is really well-matched. While that is the most efficient way of estimating parameters, it is often not what researchers care about. We often only care much about the first two to four autocorrelations and cross correlation. Regarding estimated models: you either do that via moment …

---

<div class="post-metadata">

**Author:** ![ZBCPA](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/aeb1de/32.png) [@ZBCPA](https://forum.dynare.org/u/ZBCPA)\
**Post date:** [26 August 2021 15:16 UTC](https://forum.dynare.org/t/endogenous-prior/18772/3 "2021-08-26T15:16:34Z")

</div>

Many thanks!
