# Dynare help :steady state has NaNs or Inf

**URL:** <https://forum.dynare.org/t/dynare-help-steady-state-has-nans-or-inf/26362>\
**Category:** Steady state\
**Created:** [4 September 2024 10:19 UTC](https://forum.dynare.org/t/dynare-help-steady-state-has-nans-or-inf/26362 "2024-09-04T10:19:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZhouZhou](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/ecae2f/32.png) [@ZhouZhou](https://forum.dynare.org/u/ZhouZhou)\
**Post date:** [4 September 2024 10:19 UTC](https://forum.dynare.org/t/dynare-help-steady-state-has-nans-or-inf/26362/1 "2024-09-04T10:19:15Z")

</div>

Hi,  
Please help me with this error and file.  
print\_info (line 32)  
The steady state has NaNs or Inf.

steady (line 102)  
print\_info(info,options\_.noprint, options\_);

smpclose2.driver (line 947)  
steady;

dynare (line 281)  
evalin(‘base’,[fname ‘.driver’])  
[smpclose.mod](https://forum.dynare.org/uploads/short-url/9RIwQcu2pYKZH0ixsoKu43xKg7p.mod) (7.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:** [4 September 2024 11:29 UTC](https://forum.dynare.org/t/dynare-help-steady-state-has-nans-or-inf/26362/2 "2024-09-04T11:29:03Z")

</div>

1. Only do exp()-substitutions once the model runs. Even better, use auxiliary variables. See [Question about understanding irfs in dynare - #4 by jpfeifer](https://forum.dynare.org/t/question-about-understanding-irfs-in-dynare/10622/4)
2. It should be

```auto
lamda=log(lamdass);

```

---

<div class="post-metadata">

**Author:** ![ZhouZhou](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/ecae2f/32.png) [@ZhouZhou](https://forum.dynare.org/u/ZhouZhou)\
**Post date:** [7 September 2024 12:59 UTC](https://forum.dynare.org/t/dynare-help-steady-state-has-nans-or-inf/26362/3 "2024-09-07T12:59:17Z")

</div>

thank you professor. I checked the model and found some clerical errors. But I still have some problems. Now the dynare remind me :错误使用 print\_info (line 32)  
Impossible to find the steady state (the sum of square residuals of the static equations is  
14.1014). 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

Residuals of the static equations:

Equation number 1 : 1.962 : 1  
Equation number 2 : -0.80199 : 2  
Equation number 3 : -2.528 : 3  
Equation number 4 : -1.7851 : 4  
Equation number 5 : 0 : 5  
Equation number 6 : 0 : 6  
Equation number 7 : 0 : 7  
Equation number 8 : 0 : 8  
Equation number 9 : 0 : rf  
Equation number 10 : 0 : 10  
Equation number 11 : 0 : 11  
Equation number 12 : 0 : 12  
Equation number 13 : 0 : 13  
Equation number 14 : 0 : 14  
Equation number 15 : 0 : 15  
Equation number 16 : 0 : 16  
Equation number 17 : 0 : 17  
Equation number 18 : 0 : 18  
Equation number 19 : 0 : 19  
Equation number 20 : 0 : 20  
Equation number 21 : 0 : 21  
Equation number 22 : 0 : 22  
Equation number 23 : 0 : 23  
Equation number 24 : 0.17714 : 24  
Equation number 25 : 0 : 25  
Equation number 26 : 0 : 26  
Equation number 27 : 0 : 27  
Equation number 28 : 0 : 28  
Equation number 29 : 0 : 29  
Equation number 30 : 0 : 30  
Equation number 31 : 0 : 31  
Equation number 32 : 0 : 32  
Equation number 33 : 0 : 33  
Equation number 34 : 0 : 34  
Equation number 35 : 0 : 35  
Equation number 36 : 0 : 36  
Equation number 37 : 0 : zj  
Equation number 38 : 0 : zi  
Equation number 39 : 0 : g  
Equation number 40 : 0 : S  
Equation number 41 : 0 : sj  
Equation number 42 : 0 : rh  
Equation number 43 : 0 : 43  
Equation number 44 : 0 : 44  
Equation number 45 : 0 : 45  
Equation number 46 : 0 : 46

DYNARE\_SOLVE (solve\_algo=2|4|12): the Dulmage-Mendelsohn decomposition returned a non-square block. This means that the Jacobian is singular. You may want to try another value for solve\_algo.

I checked the model so  
[Copy\_of\_smpclose.mod](https://forum.dynare.org/uploads/short-url/sa6AcZWI9PW7qUBoCxu1zYnX6SS.mod) (8.4 KB)  
I didn’t forget exp() for endogenous variable. The following is my model,could give me some advice? Thank you very much.

---

<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:** [8 September 2024 14:08 UTC](https://forum.dynare.org/t/dynare-help-steady-state-has-nans-or-inf/26362/4 "2024-09-08T14:08:15Z")

</div>

You did not follow any of my suggestions.
