Hi everyone. I have some problems when i run my dynare code, appear this error: The steady state contains NaN or Inf. Can anybody help me checking what is going wrong with my code? Thanks!!

economia_abierta.mod (2.5 KB)

Please upgrade your Dynare version. I am getting

```
Error: q not used in the model block
```

Hi professor. I made some changes, but the message “The steady state contains NaN or Inf” is still appearing.

economia_abierta.mod (2.5 KB)

Hi ihurtador,

your two AR(1) equations are wrong. First, you should use log if you insist on doing so. But then there is the real problem, you set j=0 in steady state and then use the log of it, which gives -Inf.

Are you sure that j=0? The model does not seem too large, have you tried solving for the steady state analytically and not using initval?

Best

why do my ar(1) are wrong?. I changed j=1 for j=0 and the problem gone. But now dynare can not find steady state, i have tried to solve it analitically and by a ecuation system that i attached here. Thanks!!

economia_abierta.mod (2.5 KB) foc_abierta.m (900 Bytes) sol_abierta.m (1.2 KB)

Hi ihurtador,

I do not know what model you have, so it is impossible for me to judge whether your equations are correct. I just see that the residual, given your initial values, was really large for the second equation and of course the thing with steady state of j being zero while using logs.

I can only encourage you to recheck every equation and most likely you will find the reason why you cannot calculate the steady state. Probably you build on some other model, so I would start from there as it should work then, and then add your new model-ingrediants one by one.

Best