# ''The steadystate file did not compute the steady state'' and resid(1) questions

**URL:** <https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232>\
**Category:** Steady state\
**Created:** [18 January 2018 10:12 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232 "2018-01-18T10:12:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichelleHuang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@MichelleHuang](https://forum.dynare.org/u/MichelleHuang)\
**Post date:** [18 January 2018 10:12 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232/1 "2018-01-18T10:12:15Z")

</div>

Hi, I have trouble in compiling dynare .mod file and it’s my first time to deal with it so that I am frustrated…can anyone help me? ☹

The question I met is that the result of running dynare shows: ‘‘The steadystate file did not compute the steady state’’ with only one residual stays non-zero; it seems common, however, the steady state value did solve the equation which shows non-zero residual.

The equation that shows non-zero residual is: **G + (tr\_p + tr\_i + tr\_i + tr\_e) = tax;**  
However, the steady state values are as follows **G=-0.0693** , **tax-(tr\_p+tr\_i+tr\_r+tr\_e) =-0.0693** and**Y-(c\_p+c\_i+c\_r+c\_e)-del\_k\*(k\_p+k\_e)=-0.0693**, which are derived from a matlab file whose parameters and steady state solution are the same as what in \_steadystate.m file.

If the steady state value solve the equation listed in mod file, the residual of that equation will be zero, isn’t it?

I am so frustrated and I would be very glad to get any help or hint you can give me. ☹

---

<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 January 2018 20:58 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232/2 "2018-01-18T20:58:36Z")

</div>

As a first step, please see [Residuals of SS equations in Bayesian estimation](https://forum.dynare.org/t/residuals-of-ss-equations-in-bayesian-estimation/6284)

---

<div class="post-metadata">

**Author:** ![MichelleHuang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@MichelleHuang](https://forum.dynare.org/u/MichelleHuang)\
**Post date:** [19 January 2018 13:35 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232/3 "2018-01-19T13:35:30Z")

</div>

Thanks so much for replying! But I am confusing **what you mean “in the correct order”?**

//

I have modified the \_steadystate.m file to fit the form of NK\_baseline\_steady\_state.m; however, I met another problem:

the amount of the equations whose residual stay non-zero of modified \_steadystate.m is unequal to that of pre-modified \_steadystate.m, **it increases!**

I wonder the reason why it happens. In fact, I just change the file’s name and copy my steady state formula into the “ **Enter model equations here** ” area, all the other parts stay unchanged.

I define some constants in pre-modified and modified \_steadystate.m which are consists of parameters defined in .mod file in order to compute the steady state value easily, and these constants don’t exist in .mod file. Is it the reason?

//

By the way, the pre-modified \_steadystate.m are compiled according to the \_steadystate.m from Iacoviello(2013) _Financial business cycles_ which works. Does the previous form of my \_steadystate.m file cause this kind of error message?

Thanks for your replying. 🙂

---

<div class="post-metadata">

**Author:** ![MichelleHuang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@MichelleHuang](https://forum.dynare.org/u/MichelleHuang)\
**Post date:** [22 January 2018 18:19 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232/4 "2018-01-22T18:19:43Z")

</div>

Here I try a different way to declare the steady state in which I add a **steady\_state\_model; end;** block and fill out all the formulas listed in the \_steadystate.m file.

And unfortunately, it shows the same result that one of the residuals stay non-zero while the value of that equation is actually zero by computing by \_steadystate.m file value.

I am confident of the steady state formula which I solve by hand, so I really need a help…☹

---

<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:** [23 January 2018 22:25 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232/5 "2018-01-23T22:25:48Z")

</div>

If you think your steady state file is correct, then your model must be wrong. The values returned by the steady state file/steady\_state\_model-block are inconsistent with the entered equations.

---

<div class="post-metadata">

**Author:** ![MichelleHuang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@MichelleHuang](https://forum.dynare.org/u/MichelleHuang)\
**Post date:** [28 January 2018 09:16 UTC](https://forum.dynare.org/t/the-steadystate-file-did-not-compute-the-steady-state-and-resid-1-questions/11232/6 "2018-01-28T09:16:42Z")

</div>

Thank you for your replying.

I have solved this problem after I change my model setting!

I guess that the mistake happens may result from an inappropriate setting for defining a steady state Y in my old mod file: I define a Yss in my mod file, and let Yss equal to Y in the \_steadystate.m file.

Leave a reference for someone who has the same problem with me! But I am not sure. 😜
