Hello,

When I run my code, I keep getting the same issues: it says the steady state has NaNs or Inf. There is a problem with few equations but I can’t figure out what is wrong. I would really appreciate some help. Thanks!

test2.mod (3.5 KB)

Hello,

When I run my code, I keep getting the same issues: it says the steady state has NaNs or Inf. There is a problem with few equations but I can’t figure out what is wrong. I would really appreciate some help. Thanks!

test2.mod (3.5 KB)

Hi,

There is a mistake in equation your forgot log(z_{ss}). You haven’t defined the steady state of variable X. for the rest I can only advise you to check again your steady-state calculations.

thank you! I rechecked everything but it still does not work. Thanks anyway.

Please provide the updated version of the file.

Hi @jpfeifer, attached is the most recent version. I still can’t figure out what is wrong, so I’d really appreciate any help.

model_adj.mod (2.8 KB)

Hi Kasper,

you did not give initial values for all endogenous variables but then used some of these to define others, like for X. You should find initial values for all endogenous variables, as otherwise Dynare assumes zero, which can cause problems for example in your first equation with c^(-sigma). This gives Inf when c is automatically set to zero.

The missing variables should be:

chi

varpi

c

vartheta

varphi

theta

w

b

k

1 Like

Thanks a lot @DoubleBass - I tried to correct the initval block, but I am not sure what could be plausible values to consider for some of the variables used to define other endogenous variables (I couldn’t express them only in terms of parameters). I tried using some values for those but I still couldn’t resolve the issue. Also, this may be a stupid question, but if I have a wage rigidity constraint which binds - what could be the plausible initial value for the Lagrange multiplier? Thanks in advance.

model_adj.mod (3.1 KB)

Hi Kasper,

finding good initial values can be quite tricky. You can try to solve the model as far as possible, best case all the way analytically, and the use a numerical solver to find the remaining values.

But for your issue I found that some of the initial values were complex, the reason being that n was too small. Giving `n=1;`

as a starting value and `steady(solve_algo=2,maxit=10000);`

makes the solver find a steady state.

Now, however, your model has indeterminacy which you have to further investigate.

Hello, I am still having the issue with my code. I kind of managed to resolve the problem for the simple version of the model but, the IRFs I get are quite sensitive to the choice of parameters. Do you know why this could happen? Also, is there a way to restrict the values of an endogenous variable (I have a variable theta which is a fraction but when I estimate the model it goes to around -5 or even 19). Thank you.

exec2_1.m (2.9 KB)

test2_1.mod (3.1 KB)

The fact that the steady state for `theta`

is not in the range where you expect it, suggests that there is still a mistake in your model. The steady state is a function of the deep parameters, so there is no way to restrict the values (other than adjusting the parameters)

Thank you!