# 'Impossible to find the steady state' and 'Either the model doesn't have a steady state, there are an infinity of steady states's

Hi Dynarist, I am trying to run a mod file. I attach the mod file below. I always got errors like:

Error using print_info (line 32)
Impossible to find the steady state (the sum of square residuals of the static equations is 15.7860). 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

print_info(info,options_.noprint, options_);

Some static equations have residuals close to 0. I checked the equations many times and it seems the models are fine. Is there any way I can fix this or did I make fundamental mistakes? Please any comments or advices are very welcome. I am grateful for your help!
M2logc.mod (4.6 KB)

It seems that you solved for the steady state analytically, which is optimal. But, judging from the residuals, there must be an error somewhere. I would re-check those calculations and start with equation 5, which has the largest residual. Something must be off there. Similarly, equation 17 should also be checked.

Thanks DoubleBass for your reply. I have double checked equation 5 and 17. Seems they are fine. I included both labour supply and demand side steady state equations. Is it possible that’s the problem? Many thanks for your help!

You have

``````l2ss = (wss/(psi2l*c2ss))^eta; %13
l2ss = (1-mu)*(1-alp-upsilon)*(yss/wss); %15
``````

and both give different values. That cannot work. They need to be consistent.

And if I use model_diagnostics. I also get errors like:
model_diagnostics(M_,options_,oo_)
DYNARE_SOLVE (solve_algo=2|4): number of blocks = 8
DYNARE_SOLVE (solve_algo=2|4): solving block 7, of size 1
DYNARE_SOLVE (solve_algo=2|4): solving block 6, of size 1
DYNARE_SOLVE (solve_algo=2|4): solving block 5, of size 17
DYNARE_SOLVE (solve_algo=2|4): number of blocks = 8
DYNARE_SOLVE (solve_algo=2|4): solving block 7, of size 1
DYNARE_SOLVE (solve_algo=2|4): solving block 6, of size 1
DYNARE_SOLVE (solve_algo=2|4): solving block 5, of size 17
MODEL_DIAGNOSTICS: The steady state cannot be computed

Hi professor thanks for your reply. I deleted them. The mod is still not running. I know that the number of model equations should be identical to the number of variables. But I hope to include a resource constraint then I have 24 models but 23 variables. I named this as Y and I cannot connect this to the production function. Really appreciate your help.
logc.mod (4.5 KB)

That does in no way solve the issue. You get inconsistent results and now you claim one of the two is correct, although that seems not to be the case.

Hi jpfeifer. The four equations of l1ss and l2ss are for labor demand and labor supply respectively. Can I only include labor supply steady state equations?

No, you need to compute the proper market clearing wage. That is the reason why labor demand and supply are not consistent with each other.

I am saying the steady state computation for the market clearing wage is wrong as you get two different results when you use the demand and supply equations.

Thank you very much for your reply. I’m trying to resolve wage steady state properly and I aim to use CRRA utility for consumption. To solve the steady state equations, I can solve most equations analytically. But I have two non linear equations involved when solving the wage steady state. Is there example code or non linear solver that I can learn from to solve steady state in MATLAB and Dynare with non linear equations involved? Thanks!

I managed to solve steady state analytically eventually, but the mod file still not running. It shows very high residuals this time. I attach the mod file here. Is there anything I did fundamentally wrong? I really appreciate your help! Thanks!
M2CRRA.mod (4.5 KB)

Why is

``````Lss = 1.1153e-10
``````

Hi thanks for your reply! How did you find the value of Lss? The mod is not running and I can’t see any values.

And if I run model_diagnostics(M_,options_,oo_) giving back:
DYNARE_SOLVE (solve_algo=2|4): number of blocks = 8
DYNARE_SOLVE (solve_algo=2|4): solving block 7, of size 1
DYNARE_SOLVE (solve_algo=2|4): solving block 6, of size 1
DYNARE_SOLVE (solve_algo=2|4): solving block 5, of size 17

What they mean and where should I get a start to correct these?

Model diagnostics also gives back:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.325029e-24.

MODEL_DIAGNOSTICS: The steady state cannot be computed