# Identification and data fitting

**URL:** <https://forum.dynare.org/t/identification-and-data-fitting/6253>\
**Category:** Dynare help (legacy posts)\
**Created:** [8 June 2017 07:11 UTC](https://forum.dynare.org/t/identification-and-data-fitting/6253 "2017-06-08T07:11:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuong.macro](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/46a35a/32.png) [@phuong.macro](https://forum.dynare.org/u/phuong.macro)\
**Post date:** [8 June 2017 07:11 UTC](https://forum.dynare.org/t/identification-and-data-fitting/6253/1 "2017-06-08T07:11:04Z")

</div>

Hallo Leute

I have a question relating to estimating DSGE model with Bayesian method

I wrote dynare file. At the the same time, I have data file. Before running estimating, what should I do? I mean do I need to conduct two following tests?

1. The test for identification problem
2. The test how actual data fit model. Normally, I saw literature that authors often report the actual data and predicted value (generated by Kalman Filter) on the same Graph to evaluate how the actual data fits the model

---

<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:** [9 June 2017 05:11 UTC](https://forum.dynare.org/t/identification-and-data-fitting/6253/2 "2017-06-09T05:11:24Z")

</div>

1. It is always a good idea to check identification as it is almost costless in terms of effort and may help detecting pathological issues
2. Yes, it is a good idea to check the model fit. But I don’t understand what you write about the Kalman filter. The Kalman filter will just decompose the observed historical observations in the contribution of different shocks. In-sample, the “fit” will be perfect. What you may compare is moments from simulated data to moments of the actual data.

---

<div class="post-metadata">

**Author:** ![alisa](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@alisa](https://forum.dynare.org/u/alisa)\
**Post date:** [16 July 2021 14:44 UTC](https://forum.dynare.org/t/identification-and-data-fitting/6253/3 "2021-07-16T14:44:37Z")

</div>

Hello Prof Pfeifer,  
Do you know where can I find an exmple code to check how the model fit to the data?

---

<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:** [16 July 2021 17:22 UTC](https://forum.dynare.org/t/identification-and-data-fitting/6253/4 "2021-07-16T17:22:22Z")

</div>

How exactly do you want to make that comparison?
