No Nan or Inf in steady state results or residuals of the static equations, yet error says it contains

Dear all,

I am trying to solve a simple Dixit-Stiglitz model. I log linearized the CES equations. Although “Nan or Inf” does not show up in the residuals or steady-state results, the error says “The steady state contains NaN or Inf”.
What steps would you suggest to take when faced with problems like steady state contains NaN of Inf. Here, I have attached my codes: avg.m (35 Bytes) homo.mod (2.1 KB)

Kind regards.

The problem comes from the steady state for r and rjm being 0. But rjm^(1-THETAM) will not work in this case, because you are dividing by 0.

I see your comment; should I change the values in initval to get different numbers for steady-state results?

It’s not a matter of initial values. Dynare correctly found a steady state. That steady state simply is problematic. So your model must be wrong.

Thank you for your comment.