# Seems unit root problem

**URL:** <https://forum.dynare.org/t/seems-unit-root-problem/14649>\
**Category:** Stochastic simulations\
**Created:** [28 October 2019 04:10 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649 "2019-10-28T04:10:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [28 October 2019 04:10 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/1 "2019-10-28T04:10:07Z")

</div>

Hi professor  
I have a nonlinear dsge model. From my equations it seems that there is no unit root problem (i.e. there is no first order lagged variable with coefficient one), but i’m not sure about the structural unit root (my model is closed economy). when i ru n the model i have two main problems:  
1- by model diagnosis command, the result show that there is colinearity between two ar(1) processes (shocks of productivity investment and loan to value).  
2- in impulse response system, when the shocks get to model, the responses of private capital and output don’t return to zero and remained persistent.  
Any help is appreciated.

---

<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:** [28 October 2019 13:34 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/2 "2019-10-28T13:34:10Z")

</div>

But that means there is a unit root. Without seeing the mod-file, it is impossible to provide further diagnostics.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [29 October 2019 06:50 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/3 "2019-10-29T06:50:46Z")

</div>

Hi professor  
Best regards.

---

<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:** [29 October 2019 08:29 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/4 "2019-10-29T08:29:45Z")

</div>

`model_diagnostics` indicates a singularity issue, but not a unit root. My hunch is that it has to do with your `steady_state`-operator in some equations where you are trying to determine something endogenously that cannot be determined in that way. See

> [@Levels versus Growth Rates](https://forum.dynare.org/t/levels-versus-growth-rates/5652/8):
>
> You are confusing something. If collinearity arises after using the steady\_state operator, what you have done is exactly to remove the capability of the model to determine the steady state of that variable as a function of the parameters. Take again the example of the Fisher equation and steady state inflation. If you exogenously provide the steady state inflation pibar (which cannot be endogenously determined), you can endogenously compute the steady state nominal interest as the product of re…

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [29 October 2019 09:59 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/5 "2019-10-29T09:59:39Z")

</div>

Hi  
Thanks for your reply  
I have two problem:  
1- In my previous model, i make two variables constant (capital price (q) and loan to value (lv)), and run the model. But dynare sensitivity give an error that

0% of the prior support gives unique saddle-path solution.  
0% of the prior support gives explosive dynamics.

when i search about this error, i find that it’s because of steady state operator and should not consider some variable as exogenous!!!  
2- if my model does not have unit root, why some eigenvalues are very close to one (0.9837 and 0.97)?

would you please according to my model, guide me to how i can find a solution?  
Best regards

---

<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:** [29 October 2019 11:19 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/6 "2019-10-29T11:19:48Z")

</div>

1. Sorry, but I don’t understand your first point. A value in steady state is always a constant. The question is how you try to compute that constant.
2. A unit root is an eigenvalue of exactly 1, not one close to 1. Something close to 1 will only give you large persistence, but not permanence.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [29 October 2019 11:48 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/7 "2019-10-29T11:48:51Z")

</div>

Hi  
Thanks for your prompt reply

in your last post, you give an example about fisher equation and said:  
" The problem arises when you try to simultaneously compute the steady state of inflation and the nominal interest endogenously from the model and use

```auto
r/steady_state(r)=(pi/steady_state(pi))^1.5

```

This cannot work, because any steady state combination satisfying the Fisher equation is a steady state and there are infinitely many such combinations. In contrast, in the two other examples, either picking rbar or pibar solves this indeterminacy by picking one particular combination."

my question is whether for finding steady state of variables, there must be only one unknown variable in any equation and others determined exogenously?  
if not, it’s not possible to find an amount for pi in other sector of model and then find r from euler equation?  
Because you know that it’s not possible to use fisher equation for finding pi and r simultaneously in steady state block; because dynare give an error that “in the ‘steady\_state\_model’ block, variable ‘pi’ is undefined in the declaration of variable ‘r’”.

Best regards

---

<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:** [30 October 2019 06:59 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/8 "2019-10-30T06:59:54Z")

</div>

`model_diagnostics` complains about equation 29:

```auto
exp(psi) /exp(steady_state (psi))=(exp(psi(-1)) / exp(steady_state (psi))) ^ rhop * exp(varpsi);

```

Are you sure that the steady state of `psi` can be endogenously determined?

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [30 October 2019 08:04 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/9 "2019-10-30T08:04:19Z")

</div>

In steady state block i find steady state value of psi from capital private accumulation. Is it right?

---

<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:** [30 October 2019 09:43 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/10 "2019-10-30T09:43:39Z")

</div>

That is fine and the reason why the model runs. But you should define the steady state as a parameter you set in your steady state file and use that one instead of the steady state operator. As mentioned above, any value for psi should work.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [31 October 2019 06:37 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/11 "2019-10-31T06:37:09Z")

</div>

Hi professor  
I omit the steady\_state operator and replace them by exogenous parameters (blv and bpsi in parameters block). dynare diagnosis runs and said that there is no obvious problem.  
but dynare sensitivity command is not good and send this massage that:  
0.0% of the prior support gives unique saddle-path solution.  
0.0% of the prior support gives explosive dynamics.

I do’nt know where is the source of problem? when i find value of psi and lv endogenously, dyanre diagnosis sent massege that there is colinearity between two. but when i exogenously fix steady state value of psi and lv, dynare sensivity sent massege that there is no steady state!!!  
would you please help 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:** [1 November 2019 16:27 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/12 "2019-11-01T16:27:40Z")

</div>

Please provide the updated version that gives the above result.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [5 November 2019 05:06 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/14 "2019-11-05T05:06:39Z")

</div>

Hi professor  
I attached the last version of my model, would you please help me?  
Best regards.  
[macr.prud.mod](https://forum.dynare.org/uploads/short-url/pWU4qLTYXUZh537BwepNy1SCLAo.mod) (19.3 KB)

---

<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:** [6 November 2019 15:46 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/15 "2019-11-06T15:46:08Z")

</div>

What am I supposed to do with the file? It runs on my machine without any problem.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [7 November 2019 06:33 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/16 "2019-11-07T06:33:21Z")

</div>

Hi  
If you check model diagnosis, it gives an error that there is colinearity between psi and lv equations.  
I change an steady state operator (i.e. steady\_state (psi) and steady\_state(lv)) to fixed parameter (i.e. bpsi and blv); but dynare sensitivity gives an error that : .0% of the prior support gives unique saddle-path solution.  
0.0% of the prior support gives explosive dynamics.

For 100.0% of the prior support dynare could not find a solution.

```
For 100.0% The steadystate routine thrown an exception (inconsistent deep parameters).

```

could you please check the irf’s? because the shocks are persistent and don’t get back to zero.  
Would you please check the model again and help me?  
Best regards.

[mac\_prud2.mod](https://forum.dynare.org/uploads/short-url/4anP2ahMDhPWOH2zUIDxoTMCF4r.mod) (19.3 KB)

---

<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:** [7 November 2019 11:42 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/17 "2019-11-07T11:42:08Z")

</div>

That’s because your steady state file is incorrect. If you change `aa=0.7` the steady state file does not work.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [22 November 2019 09:12 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/18 "2019-11-22T09:12:09Z")

</div>

Hi professor  
by using a separate steady state file, i can solve model diagnosis and dynare sensitivity problem simultaneously, but as you said if i change some parameters (like aa, ddk, etc.) by small amount, residuals of two above mentioned equations (i.e. lv and psi) become nonzero and dynare give an error that: Error in steady (line 104).  
I have another question, is there any problem that coefficient of policy function equal 1? in my model, response of variable y (i.e. output) to productivity shock (vara) equal one? Is it a sign of unit root?  
would you please help me to solve this problem.

---

<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 2019 15:09 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/19 "2019-11-22T15:09:28Z")

</div>

Sorry, but I don’t understand your post.

1. A steady state file returns a steady state (or an error code) for every possible parameter combination. If that is not the case when you vary some parameters, then your computation is wrong.
2. No, you cannot read of a unit root from one coefficient in the policy rule, because the shocks will also affect other variables entering the policy function with a lag. That is why you need to look at the eigenvalues of the transition matrix. Dynare’s `check`-command does that.

---

<div class="post-metadata">

**Author:** ![rss](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@rss](https://forum.dynare.org/u/rss)\
**Post date:** [23 November 2019 04:37 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/20 "2019-11-23T04:37:33Z")

</div>

Hi professor  
Excuse me for ask this simple question, but what do you mean by “your computation is wrong”?  
Because in process of finding steady state, i assumed a fix number for output; and then step by step i finded other one.  
Would you please help me with this?  
Best regards.

---

<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:** [24 November 2019 10:09 UTC](https://forum.dynare.org/t/seems-unit-root-problem/14649/21 "2019-11-24T10:09:21Z")

</div>

You cannot fix a number for output unless you endogenously compute a parameter (typically steady state TFP A) that makes
