# The rank condition ISN'T verified!11

**URL:** <https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876>\
**Category:** Stochastic simulations\
**Created:** [25 February 2022 03:32 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876 "2022-02-25T03:32:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangshiye](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@wangshiye](https://forum.dynare.org/u/wangshiye)\
**Post date:** [25 February 2022 03:32 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/1 "2022-02-25T03:32:38Z")

</div>

I tried adding an ingredient department to the NK model, company1 in the mod. Extvalue (s) LARGER than 1 in modulus  
for 10 forward-looking variable(s)

The rank condition ISN’T verified!  
The model residual is zero. When I deleted the raw material section, the model worked. Is there something wrong with the time in my model? I have tried many times to modify the time of capital, but the problem has not been solved.  
[ceshi1.mod](https://forum.dynare.org/uploads/short-url/qdsC0LpRwFVBPhhE1fUpPZeqH2A.mod) (2.8 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:** [25 February 2022 08:18 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/2 "2022-02-25T08:18:33Z")

</div>

You need to provide more context. You wrote

> [@wangshiye](#):
>
> When I deleted the raw material section, the model worked.

but never told us where that part is in your code. As is, your model implies instability. So consider what may cause variables to explode when you add raw materials. Also, if the model works with your capital timing without that part, then the timing of capital should be correct and the problem is with the newly added part.

---

<div class="post-metadata">

**Author:** ![wangshiye](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@wangshiye](https://forum.dynare.org/u/wangshiye)\
**Post date:** [25 February 2022 12:07 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/3 "2022-02-25T12:07:48Z")

</div>

> [@wangshiye](#):
>
> The rank condition ISN’T verified!

In my model, producers use labor, capital, and fossil energy to produce products. Fossil energy producers use capital and fossil raw materials to produce fossil energy. The price of fossil materials is given externally. The model residual is zero, but it still reminded me: The rank condition ISN’t verified!

---

<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:** [25 February 2022 19:29 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/4 "2022-02-25T19:29:45Z")

</div>

Then you need to think hard about why that part may cause instability. Note that the residuals are meaningless in this case as it is about the dynamics.

---

<div class="post-metadata">

**Author:** ![vahagn](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://forum.dynare.org/u/vahagn)\
**Post date:** [18 August 2022 08:31 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/5 "2022-08-18T08:31:35Z")

</div>

Hi, I tried to run a small open economy model with two agents (Ricardian and Non - ricardian) and with two sectors (tradable and non - tradable) and encountered the problem with rank conditions. I read other topics similar to mine but didn’t find a solution. Can someone, help me with this issue?  
[solve\_two\_agent\_2.mod](https://forum.dynare.org/uploads/short-url/xcDYddeLa28mXEPkk0s1cGm0ew0.mod) (14.5 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:** [19 August 2022 07:14 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/6 "2022-08-19T07:14:01Z")

</div>

Sorry, but with a model that size, it’s hard to debug. You should start from a simpler model.

---

<div class="post-metadata">

**Author:** ![vahagn](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://forum.dynare.org/u/vahagn)\
**Post date:** [19 August 2022 07:29 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/7 "2022-08-19T07:29:04Z")

</div>

Thank You for Your reply Professor. I did a closed model with two agents and different production sectors, also a small open economy model with one agent and two sectors, but when I tried to somehow mix them I got this model, which doesn’t work.

---

<div class="post-metadata">

**Author:** ![vahagn](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://forum.dynare.org/u/vahagn)\
**Post date:** [19 August 2022 07:30 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/8 "2022-08-19T07:30:51Z")

</div>

Can the problem arise from including wrong equation? Or from steady state values, I mean computing steady state not correctly?

---

<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:** [19 August 2022 07:57 UTC](https://forum.dynare.org/t/the-rank-condition-isnt-verified-11/19876/9 "2022-08-19T07:57:22Z")

</div>

See

> [@Is timing the only reason of Blanchard Kahn conditions fail](https://forum.dynare.org/t/is-timing-the-only-reason-of-blanchard-kahn-conditions-fail/5189/2):
>
> In 9 out of 10 cases, the timing is the reason. The less common reasons are wrong parameter values and general mistakes in the equations.

The steady state is unlikely to be the reason unless there are multiple steady states. After all, your steady state values solve the entered equations. That being said, you are using a linearized model, so the steady state values of the nonlinear model turn up as parameters. Wrong computations here fall under the parameter value issue.
