# Issues with estimation MCMC method

**URL:** <https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950>\
**Category:** ML/Bayesian estimation\
**Created:** [18 November 2020 07:07 UTC](https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950 "2020-11-18T07:07:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyc1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/eada6e/32.png) [@lyc1](https://forum.dynare.org/u/lyc1)\
**Post date:** [18 November 2020 07:07 UTC](https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950/1 "2020-11-18T07:07:45Z")

</div>

I have a model as follow. I use GDP as my observable var. (take log and use hpfilter to find cycle and take cycle as varovs). I compute steady state by myself and it’s correct cuz dynare can compute the model.  
BUT when I try to estimate parameters like alpha or beta. It can not work.  
The following shows the error  
Impossible to find the steady state (the sum of square residuals of the static equations  
is 0.0003). Either the model doesn’t have a steady state, there are an infinity of  
steady states, or the guess values are too far from the solution

[index.m](https://forum.dynare.org/uploads/short-url/poHDmg524tri5WfPUOYUoj0Q4i.m) (1.6 KB) [test.mod](https://forum.dynare.org/uploads/short-url/gBtaMuST2ceAzBlsXc8vWTXZBQc.mod) (6.6 KB) [datay.mat|attachment]

---

<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:** [18 November 2020 09:15 UTC](https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950/2 "2020-11-18T09:15:35Z")

</div>

1. The datafile is missing.
2. Please use a steady\_state\_model-block for your analytical steady state.
3. Your observable is non-mean 0 in the model, but mean 0 in the data. You need to specify a proper observation equation. See [Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”](https://drive.google.com/file/d/1r89OU5OE3CBa6tOlj6l3hNVWEaRH5Anv/view?usp=sharing).
4. See

> [@Demean the series or not](https://forum.dynare.org/t/demean-the-series-or-not/11130/2):
>
> First of all (as always): do not use the two-sided HP filter for estimating DSGE models. See Pfeifer (2013): “[A Guide to Specifying Observation Equations for the Estimation of DSGE Models](https://drive.google.com/file/d/1r89OU5OE3CBa6tOlj6l3hNVWEaRH5Anv/view?usp=sharing)". If you must, use the one-sided HP filter Depending on the filter you use, your data will be mean 0 (true for the one-sided and two-sided HP filter). Prefiltering in this case is not needed, because the empirical mean you subtract will be 0. Thus prefilter=1 will be harmless, but useless.

---

<div class="post-metadata">

**Author:** ![lyc1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/eada6e/32.png) [@lyc1](https://forum.dynare.org/u/lyc1)\
**Post date:** [21 November 2020 12:05 UTC](https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950/3 "2020-11-21T12:05:42Z")

</div>

Thank you sir, Finally I can do estimate for my model.  
I have one more question. How to choose calibration and estimation? What kind of parameters should I calibrate and what kind of parameters should I estimate.

---

<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:** [22 November 2020 10:43 UTC](https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950/4 "2020-11-22T10:43:38Z")

</div>

See

> [@A Question on Bayesian Estimation and Calibration](https://forum.dynare.org/t/a-question-on-bayesian-estimation-and-calibration/4095):
>
> Hi Guys, In all the papers concerning the Bayesian estimation approach, there are always some parameters which need to be fixed (to be calibrated rather than be imposed some prior and be estimated). Is there any efficient rule to judge which parameters to be calibrated or to be estimated?

---

<div class="post-metadata">

**Author:** ![lyc1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/eada6e/32.png) [@lyc1](https://forum.dynare.org/u/lyc1)\
**Post date:** [25 November 2020 08:13 UTC](https://forum.dynare.org/t/issues-with-estimation-mcmc-method/16950/5 "2020-11-25T08:13:13Z")

</div>

Thanks very much Professor Pfeifer.  
Yours,  
Li
